From 1681cdaeabf7a49b8a9ced7b4a24bee9170d9c74 Mon Sep 17 00:00:00 2001 From: vargburz Date: Fri, 27 May 2022 21:08:28 +0300 Subject: [PATCH] fix parent class --- src/models/options.ts | 5 ++--- src/models/series.ts | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/models/options.ts b/src/models/options.ts index b668691..e7ed846 100644 --- a/src/models/options.ts +++ b/src/models/options.ts @@ -99,9 +99,8 @@ export const CORE_DEFAULT_OPTIONS: Options = { export class CoreOptions { _options: O; - protected podDefaults?: Partial; - constructor(options: O) { + constructor(options: O, private _podDefaults?: Partial) { this.setOptions(options); } @@ -115,7 +114,7 @@ export class CoreOptions { // this getter can be overrited in Pod protected getDefaults(): Partial { - return lodashDefaultsDeep(this.podDefaults, CORE_DEFAULT_OPTIONS); + return lodashDefaultsDeep(this._podDefaults, CORE_DEFAULT_OPTIONS); } get allOptions(): O { diff --git a/src/models/series.ts b/src/models/series.ts index ac38bbe..20fd258 100644 --- a/src/models/series.ts +++ b/src/models/series.ts @@ -27,9 +27,8 @@ export const CORE_SERIE_DEFAULTS = { export class CoreSeries { _series: Array = []; - protected podDefaults?: Partial; - constructor(series: T[]) { + constructor(series: T[], private _podDefaults?: Partial) { this.setSeries(series); } @@ -60,7 +59,7 @@ export class CoreSeries { // this getter can be overrited in Pod protected getDefaults(): Partial { - return lodashDefaultsDeep(this.podDefaults, CORE_SERIE_DEFAULTS); + return lodashDefaultsDeep(this._podDefaults, CORE_SERIE_DEFAULTS); } private _isSerieEmpty(serie: T): boolean {