mirror of
https://github.com/discourse/discourse.git
synced 2025-01-18 16:42:46 +08:00
DEV: uses router.currentRouteName instead of application (#7942)
https://deprecations.emberjs.com/v3.x/#toc_application-controller-router-properties
This commit is contained in:
parent
1dde6a5355
commit
0c7df55686
|
@ -81,7 +81,7 @@ export function addPopupMenuOptionsCallback(callback) {
|
|||
|
||||
export default Ember.Controller.extend({
|
||||
topicController: Ember.inject.controller("topic"),
|
||||
application: Ember.inject.controller(),
|
||||
router: Ember.inject.service(),
|
||||
|
||||
replyAsNewTopicDraft: Ember.computed.equal(
|
||||
"model.draftKey",
|
||||
|
@ -730,7 +730,7 @@ export default Ember.Controller.extend({
|
|||
});
|
||||
|
||||
if (
|
||||
this.get("application.currentRouteName").split(".")[0] === "topic" &&
|
||||
this.router.currentRouteName.split(".")[0] === "topic" &&
|
||||
composer.get("topic.id") === this.get("topicModel.id")
|
||||
) {
|
||||
staged = composer.get("stagedPost");
|
||||
|
|
|
@ -37,7 +37,7 @@ export function startPageTracking(router, appEvents) {
|
|||
appEvents.trigger("page:changed", {
|
||||
url,
|
||||
title,
|
||||
currentRouteName: router.get("currentRouteName"),
|
||||
currentRouteName: router.currentRouteName,
|
||||
replacedOnlyQueryParams
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user