Skip to content

Commit

Permalink
FIX: adopt new router service format
Browse files Browse the repository at this point in the history
  • Loading branch information
merefield committed Aug 15, 2020
1 parent b725dc6 commit 7a2f539
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions javascripts/discourse/initializers/preview-edits.js.es6
Expand Up @@ -18,6 +18,7 @@ import Topic from 'discourse/models/topic';
import loadScript from 'discourse/lib/load-script';
import { cookAsync } from 'discourse/lib/text';
import { debounce } from '@ember/runloop';
import { inject as service } from "@ember/service";

export default {
name: 'preview-edits',
Expand Down Expand Up @@ -45,7 +46,7 @@ export default {
api.modifyClass ('component:basic-topic-list', Settings);

api.modifyClass ('component:basic-topic-list', {
router: Ember.inject.service ('-routing'),
router: service('router'),
classNameBindings: [
'showThumbnail',
'showExcerpt',
Expand All @@ -68,8 +69,8 @@ export default {
api.modifyClass ('component:topic-list', Settings);

api.modifyClass ('component:topic-list', {
router: Ember.inject.service ('-routing'),
currentRoute: alias ('router.router.currentRouteName'),
router: service('router'),
currentRoute: alias ('router.currentRouteName'),
classNameBindings: [
'showThumbnail',
'showExcerpt',
Expand Down

0 comments on commit 7a2f539

Please sign in to comment.