DEV: uses router.currentRouteName instead of application (#7942)

https://deprecations.emberjs.com/v3.x/#toc_application-controller-router-properties
This commit is contained in:
Joffrey JAFFEUX 2019-07-25 12:50:30 +02:00 committed by GitHub
parent 1dde6a5355
commit 0c7df55686
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

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

View File

@ -37,7 +37,7 @@ export function startPageTracking(router, appEvents) {
appEvents.trigger("page:changed", {
url,
title,
currentRouteName: router.get("currentRouteName"),
currentRouteName: router.currentRouteName,
replacedOnlyQueryParams
});
});