Replace findProperty and filterProperty with findBy and filterBy
This commit is contained in:
@@ -47,7 +47,7 @@ export default Ember.Component.extend({
|
||||
target = target.find('a');
|
||||
}
|
||||
|
||||
const topic = this.get('topics').findProperty('id', parseInt(topicId));
|
||||
const topic = this.get('topics').findBy('id', parseInt(topicId));
|
||||
this.sendAction('postsAction', {topic, position: target.offset()});
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -50,7 +50,7 @@ export default Ember.Component.extend({
|
||||
|
||||
const posts = topic.get('postStream.posts');
|
||||
if (posts && topicId === topic.get('id')) {
|
||||
const quotedPost = posts.findProperty("post_number", postNumber);
|
||||
const quotedPost = posts.findBy("post_number", postNumber);
|
||||
if (quotedPost) {
|
||||
return tinyAvatar(quotedPost.get('avatar_template'));
|
||||
}
|
||||
|
||||
@@ -123,7 +123,7 @@ class Toolbar {
|
||||
}
|
||||
|
||||
addButton(button) {
|
||||
const g = this.groups.findProperty('group', button.group);
|
||||
const g = this.groups.findBy('group', button.group);
|
||||
if (!g) {
|
||||
throw `Couldn't find toolbar group ${button.group}`;
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ export default Combobox.extend({
|
||||
}
|
||||
|
||||
this.comboTemplate = (item) => {
|
||||
const contentItem = content.findProperty('id', item.id);
|
||||
const contentItem = content.findBy('id', item.id);
|
||||
if (!contentItem) { return item.text; }
|
||||
return `${iconHTML(contentItem.icon)} ${item.text}`;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user