mirror of
https://github.com/discourse/discourse.git
synced 2025-04-25 20:14:29 +08:00
Use the view registry instead of Ember.View.views
This commit is contained in:
parent
3d8cfac8bf
commit
438e1bc0a9
@ -209,8 +209,11 @@ export default {
|
|||||||
sendToTopicListItemView(action) {
|
sendToTopicListItemView(action) {
|
||||||
const elem = $('tr.selected.topic-list-item.ember-view')[0];
|
const elem = $('tr.selected.topic-list-item.ember-view')[0];
|
||||||
if (elem) {
|
if (elem) {
|
||||||
const view = Ember.View.views[elem.id];
|
const registry = this.container.lookup('-view-registry:main');
|
||||||
view.send(action);
|
if (registry) {
|
||||||
|
const view = registry[elem.id];
|
||||||
|
view.send(action);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user