Skip to content

Commit

Permalink
DEV: Resolve transitionTo deprecation (#535)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidtaylorhq authored Dec 1, 2023
1 parent e1aabe0 commit 9556df6
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { inject as service } from "@ember/service";
import cookie from "discourse/lib/cookie";
import UserTopicListRoute from "discourse/routes/user-topic-list";
import I18n from "I18n";

export default class UserActivityAssigned extends UserTopicListRoute {
@service router;
templateName = "user-activity-assigned";
controllerName = "user-activity-assigned";

Expand All @@ -12,7 +14,7 @@ export default class UserActivityAssigned extends UserTopicListRoute {
beforeModel() {
if (!this.currentUser) {
cookie("destination_url", window.location.href);
this.transitionTo("login");
this.router.transitionTo("login");
}
}

Expand Down

0 comments on commit 9556df6

Please sign in to comment.