diff --git a/package.json b/package.json index ff45399..32dea8e 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@chartwerk/core", - "version": "0.6.1", + "version": "0.6.2", "description": "Chartwerk core", "main": "dist/index.js", "types": "dist/index.d.ts", 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 {