From f45f1f018b8f7bc24382287897b86a32954a1136 Mon Sep 17 00:00:00 2001 From: Nathalie Date: Wed, 6 Nov 2024 11:13:53 +0100 Subject: [PATCH] Fixed: deprecation on getWithDefault --- addon/configuration.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/addon/configuration.ts b/addon/configuration.ts index 1999b7c..5ee5455 100644 --- a/addon/configuration.ts +++ b/addon/configuration.ts @@ -1,5 +1,4 @@ // @ts-nocheck -import { getWithDefault } from '@ember/object'; import { typeOf } from '@ember/utils'; const DEFAULTS = { @@ -17,9 +16,9 @@ export default { // eslint-disable-next-line no-prototype-builtins if (this.hasOwnProperty(property) && typeOf(this[property]) !== 'function') { if (this[property].constructor == Object) { - this[property] = Object.assign(this[property], getWithDefault(config, property, DEFAULTS[property])); + this[property] = Object.assign(this[property], config[property] ?? DEFAULTS[property]); } else { - this[property] = getWithDefault(config, property, DEFAULTS[property]); + this[property] = config[property] ?? DEFAULTS[property]; } } }