diff --git a/src/models/view/fieldView.ts b/src/models/view/fieldView.ts index b3f68a584f..e09d60960e 100644 --- a/src/models/view/fieldView.ts +++ b/src/models/view/fieldView.ts @@ -6,13 +6,9 @@ import { Field } from '../domain/field'; export class FieldView implements View { name: string; + value: string; type: FieldType; - // tslint:disable - private _value: string; - private _maskedValue: string; - // tslint:enable - constructor(f?: Field) { if (!f) { return; @@ -21,22 +17,7 @@ export class FieldView implements View { this.type = f.type; } - get value(): string { - return this._value; - } - set value(value: string) { - this._value = value; - this._maskedValue = null; - } - get maskedValue(): string { - if (this._maskedValue == null && this.value != null) { - this._maskedValue = ''; - for (let i = 0; i < this.value.length; i++) { - this._maskedValue += '•'; - } - } - - return this._maskedValue; + return this.value != null ? '••••••••' : null; } }