From 7b210f6812969a9bed8f30d4d8eb0ad7c687fb5f Mon Sep 17 00:00:00 2001 From: Richard Viney Date: Wed, 16 Sep 2020 18:18:16 +1200 Subject: [PATCH] Remove use of the deprecated getWithDefault API (#2237) --- packages/ember-simple-auth/addon/configuration.js | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/packages/ember-simple-auth/addon/configuration.js b/packages/ember-simple-auth/addon/configuration.js index 0a967d9dd..87cd0b572 100644 --- a/packages/ember-simple-auth/addon/configuration.js +++ b/packages/ember-simple-auth/addon/configuration.js @@ -1,5 +1,3 @@ -import { getWithDefault } from '@ember/object'; - const DEFAULTS = { rootURL: '', routeAfterAuthentication: 'index', @@ -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; }, };