Skip to content

Commit

Permalink
Remove use of the deprecated getWithDefault API (#2237)
Browse files Browse the repository at this point in the history
  • Loading branch information
richard-viney committed Sep 16, 2020
1 parent b66e862 commit 7b210f6
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions packages/ember-simple-auth/addon/configuration.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { getWithDefault } from '@ember/object';

const DEFAULTS = {
rootURL: '',
routeAfterAuthentication: 'index',
Expand Down Expand Up @@ -39,11 +37,10 @@ export default {
routeAfterAuthentication: DEFAULTS.routeAfterAuthentication,

load(config) {
this.rootURL = getWithDefault(config, 'rootURL', DEFAULTS.rootURL);
this.routeAfterAuthentication = getWithDefault(
config,
'routeAfterAuthentication',
DEFAULTS.routeAfterAuthentication
);
this.rootURL = config.rootURL !== undefined ? config.rootURL : DEFAULTS.rootURL;
this.routeAfterAuthentication =
config.routeAfterAuthentication !== undefined
? config.routeAfterAuthentication
: DEFAULTS.routeAfterAuthentication;
},
};

0 comments on commit 7b210f6

Please sign in to comment.