aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2020-08-19 19:58:57 -0400
committerbobzel <zzzman@gmail.com>2020-08-19 19:58:57 -0400
commit093b9b03528a2187ac71db0945a031a8298b8002 (patch)
tree2952c8157b6322e4997ae5774d7560f6448f3963 /src
parent9ab88617231edf79b8f1a85e997d02a04ced85fd (diff)
fixed errors caused by Doc symFields not being variable functions and thus not having 'this' bound correctly.
Diffstat (limited to 'src')
-rw-r--r--src/client/views/nodes/formattedText/DashFieldView.tsx2
-rw-r--r--src/fields/Doc.ts10
2 files changed, 6 insertions, 6 deletions
diff --git a/src/client/views/nodes/formattedText/DashFieldView.tsx b/src/client/views/nodes/formattedText/DashFieldView.tsx
index 8ae71c035..924079096 100644
--- a/src/client/views/nodes/formattedText/DashFieldView.tsx
+++ b/src/client/views/nodes/formattedText/DashFieldView.tsx
@@ -183,7 +183,7 @@ export class DashFieldViewInternal extends React.Component<IDashFieldViewInterna
}
if (container) {
const alias = Doc.MakeAlias(container.props.Document);
- alias.viewType = CollectionViewType.Time;
+ alias._viewType = CollectionViewType.Time;
let list = Cast(alias._columnHeaders, listSpec(SchemaHeaderField));
if (!list) {
alias._columnHeaders = list = new List<SchemaHeaderField>();
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];