diff --git a/src/session_nub.ts b/src/session_nub.ts index a8ce1687412c6b4823fde17eb9dec524de40dcf4..00773aa804be63fe6afcd17de4cc328535e20332 100644 --- a/src/session_nub.ts +++ b/src/session_nub.ts @@ -74,7 +74,9 @@ export class Props implements IObservable { public clone(): Props { const res = new Props(); for (const k in this._props) { - res._props[k] = this._props[k]; + if (this._props.hasOwnProperty(k)) { + res._props[k] = this._props[k]; + } } return res; } @@ -82,12 +84,14 @@ export class Props implements IObservable { public toString(): string { let res = "["; for (const k in this._props) { - if (res !== "[") { - res += ", "; + if (this._props.hasOwnProperty(k)) { + if (res !== "[") { + res += ", "; + } + res += `${k}:${this._props[k]}`; } - res += `${k}:${this._props[k]}`; } - res += "]" + res += "]"; return res; } @@ -174,6 +178,7 @@ export class Props implements IObservable { /** * Nub utilisé dans une session */ +// tslint:disable-next-line:max-classes-per-file export class SessionNub { private _props: Props;