Skip to content

Commit

Permalink
Merge pull request #15 from upfluence/na/VEL-3592
Browse files Browse the repository at this point in the history
Fixed: deprecation on getWithDefault
  • Loading branch information
nathalieArnoux authored Nov 8, 2024
2 parents d131813 + f45f1f0 commit d82178e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions addon/configuration.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// @ts-nocheck
import { getWithDefault } from '@ember/object';
import { typeOf } from '@ember/utils';

const DEFAULTS = {
Expand All @@ -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];
}
}
}
Expand Down

0 comments on commit d82178e

Please sign in to comment.