FIX: Temporarily compatibility for Evented on a Topic Route

This commit is contained in:
Robin Ward 2020-04-20 17:14:51 -04:00
parent 5d9f5dd11f
commit ce9c59309c
1 changed files with 7 additions and 1 deletions

View File

@ -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;