Skip to content

Commit

Permalink
rm deprecation outdated
Browse files Browse the repository at this point in the history
  • Loading branch information
snewcomer committed Jan 4, 2021
1 parent 1869d10 commit b430c71
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions addon/locations/router-scroll.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import HistoryLocation from '@ember/routing/history-location';
import { set, get } from '@ember/object';
import { deprecate } from '@ember/application/deprecations';

const uuid = () => 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {
const r = Math.random() * 16 | 0;
Expand All @@ -9,19 +8,6 @@ const uuid = () => 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) =
});

export default class extends HistoryLocation {
init() {
super.init(...arguments);

deprecate(
`Setting 'locationType' to 'router-scroll' in config/environment.js is deprecated, please change it to 'auto'. If you are overriding ember-router-scroll's implementation of "pushState" or "replaceState", then you can subclass and override a new location object from: import HistoryLocation from '@ember/routing/history-location';`,
false,
{
id: 'ember-router-scroll',
until: '2.0.0'
}
);
}

pushState(path) {
const state = { path, uuid: uuid() };
get(this, 'history').pushState(state, null, path);
Expand Down

0 comments on commit b430c71

Please sign in to comment.