diff --git a/lib/ControlModel.ts b/lib/ControlModel.ts index fb3c57b..a0fe793 100644 --- a/lib/ControlModel.ts +++ b/lib/ControlModel.ts @@ -6,13 +6,13 @@ */ export abstract class ControlModel { - protected data: Record; + protected data: Record = {}; public abstract get object(): Record; public abstract set object(obj: Record); public get (key: string): string|number|boolean { - return data[key]; + return this.data[key]; } public set (key: string, value: string|number|boolean): void { diff --git a/lib/DatabaseModel.ts b/lib/DatabaseModel.ts index 6a910a6..9b4d211 100644 --- a/lib/DatabaseModel.ts +++ b/lib/DatabaseModel.ts @@ -16,7 +16,7 @@ export abstract class DatabaseModel { this.data.id = val; } - public get object (): Record { + public get object (): Record { return this.data; }