FIX: Temporarily compatibility for Evented on a Topic Route
This commit is contained in:
parent
5d9f5dd11f
commit
ce9c59309c
|
@ -5,12 +5,13 @@ import DiscourseRoute from "discourse/routes/discourse";
|
|||
import DiscourseURL from "discourse/lib/url";
|
||||
import { ID_CONSTRAINT } from "discourse/models/topic";
|
||||
import Evented from "@ember/object/evented";
|
||||
import EmberObject from "@ember/object";
|
||||
|
||||
const SCROLL_DELAY = 500;
|
||||
|
||||
import showModal from "discourse/lib/show-modal";
|
||||
|
||||
const TopicRoute = DiscourseRoute.extend(Evented, {
|
||||
const TopicRoute = DiscourseRoute.extend({
|
||||
init() {
|
||||
this._super(...arguments);
|
||||
|
||||
|
@ -332,4 +333,9 @@ const TopicRoute = DiscourseRoute.extend(Evented, {
|
|||
}
|
||||
});
|
||||
|
||||
// TODO: Remove this - it's barely used.
|
||||
const events = EmberObject.extend(Evented).create();
|
||||
TopicRoute.on = events.on;
|
||||
TopicRoute.trigger = events.trigger;
|
||||
|
||||
export default TopicRoute;
|
||||
|
|
Loading…
Reference in New Issue