diff --git a/src/models/options.ts b/src/models/options.ts index dd974d7..ea2cf3d 100644 --- a/src/models/options.ts +++ b/src/models/options.ts @@ -8,7 +8,6 @@ import { } from '../types'; import lodashDefaultsDeep from 'lodash/defaultsDeep'; -import lodashMap from 'lodash/map'; import lodashCloneDeep from 'lodash/cloneDeep'; import has from 'lodash/has'; @@ -100,7 +99,7 @@ const DEFAULT_OPTIONS: Options = { export class CoreOptions { _options: O; - _defaults: Options = DEFAULT_OPTIONS; + _coreDefaults: Options = DEFAULT_OPTIONS; constructor(options: O) { this.setOptions(options); @@ -111,7 +110,12 @@ export class CoreOptions { } protected setOptions(options: O): void { - this._options = lodashDefaultsDeep(lodashCloneDeep(options), this._defaults); + this._options = lodashDefaultsDeep(lodashCloneDeep(options), this.defaults); + } + + // this getter can be overrited in Pod + protected get defaults(): Options { + return this._coreDefaults; } get allOptions(): O {