FIX: Broken tests
This commit is contained in:
parent
5dd81700f1
commit
200da89355
|
@ -278,8 +278,8 @@ createWidget('post-contents', {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const topic = this.findAncestorModel().get('topic');
|
const post = this.findAncestorModel();
|
||||||
const topicUrl = topic.get('url');
|
const topicUrl = post ? post.get('topic.url') : null;
|
||||||
return this.store.find('post-reply', { postId: this.attrs.id }).then(posts => {
|
return this.store.find('post-reply', { postId: this.attrs.id }).then(posts => {
|
||||||
this.state.repliesBelow = posts.map(p => {
|
this.state.repliesBelow = posts.map(p => {
|
||||||
p.shareUrl = `${topicUrl}/${p.post_number}`;
|
p.shareUrl = `${topicUrl}/${p.post_number}`;
|
||||||
|
@ -356,8 +356,8 @@ createWidget('post-article', {
|
||||||
this.state.repliesAbove = [];
|
this.state.repliesAbove = [];
|
||||||
return Ember.RSVP.Promise.resolve();
|
return Ember.RSVP.Promise.resolve();
|
||||||
} else {
|
} else {
|
||||||
const topic = this.findAncestorModel().get('topic');
|
const post = this.findAncestorModel();
|
||||||
const topicUrl = topic.get('url');
|
const topicUrl = post ? post.get('topic.url') : null;
|
||||||
return this.store.find('post-reply-history', { postId: this.attrs.id }).then(posts => {
|
return this.store.find('post-reply-history', { postId: this.attrs.id }).then(posts => {
|
||||||
this.state.repliesAbove = posts.map((p) => {
|
this.state.repliesAbove = posts.map((p) => {
|
||||||
p.shareUrl = `${topicUrl}/${p.post_number}`;
|
p.shareUrl = `${topicUrl}/${p.post_number}`;
|
||||||
|
|
Loading…
Reference in New Issue