From 093b9b03528a2187ac71db0945a031a8298b8002 Mon Sep 17 00:00:00 2001 From: bobzel Date: Wed, 19 Aug 2020 19:58:57 -0400 Subject: fixed errors caused by Doc symFields not being variable functions and thus not having 'this' bound correctly. --- src/fields/Doc.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/fields') diff --git a/src/fields/Doc.ts b/src/fields/Doc.ts index 0dcb8ab42..4797fb4cb 100644 --- a/src/fields/Doc.ts +++ b/src/fields/Doc.ts @@ -206,11 +206,11 @@ export class Doc extends RefField { private [Self] = this; private [SelfProxy]: any; - public [FieldsSym](clear?: boolean) { return clear ? this.___fields = this.___fieldKeys = {} : this.___fields; } - public [WidthSym]() { return NumCast(this[SelfProxy]._width); } - public [HeightSym]() { return NumCast(this[SelfProxy]._height); } - public [ToScriptString]() { return `DOC-"${this[Self][Id]}"-`; } - public [ToString]() { return `Doc(${GetEffectiveAcl(this) === AclPrivate ? "-inaccessible-" : this.title})`; } + public [FieldsSym] = (clear?: boolean) => { return clear ? this.___fields = this.___fieldKeys = {} : this.___fields; } + public [WidthSym] = () => { return NumCast(this[SelfProxy]._width); } + public [HeightSym] = () => { return NumCast(this[SelfProxy]._height); } + public [ToScriptString] = () => { return `DOC-"${this[Self][Id]}"-`; } + public [ToString] = () => { return `Doc(${GetEffectiveAcl(this) === AclPrivate ? "-inaccessible-" : this.title})`; } public get [LayoutSym]() { return this[SelfProxy].__LAYOUT__; } public get [DataSym]() { const self = this[SelfProxy]; -- cgit v1.2.3-70-g09d2