aboutsummaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2020-07-26 10:15:59 -0400
committerBob Zeleznik <zzzman@gmail.com>2020-07-26 10:15:59 -0400
commit5fb6e6348b73c81c4f7900f819fc55fcffe2f661 (patch)
tree771fc05d8bcf4ce89aa589e4f6bccae02c8bff64 /src/client
parent0fead8a6b66a08d63d57ffc741d1854011070b69 (diff)
fixed copyField() to copy non-ObjectFields. fixed docFilters button to work with no filter
Diffstat (limited to 'src/client')
-rw-r--r--src/client/views/collections/CollectionMenu.tsx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/views/collections/CollectionMenu.tsx b/src/client/views/collections/CollectionMenu.tsx
index 81c349b26..24be69050 100644
--- a/src/client/views/collections/CollectionMenu.tsx
+++ b/src/client/views/collections/CollectionMenu.tsx
@@ -111,7 +111,7 @@ export class CollectionViewBaseChrome extends React.Component<CollectionMenuProp
params: ["target"], title: "save filter",
script: "self.target._docFilters = copyField(self['target-docFilters']);",
immediate: undoBatch((source: Doc[]) => this.target._docFilters = undefined),
- initialize: (button: Doc) => { button['target-docFilters'] = this.target._docFilters instanceof ObjectField && ObjectField.MakeCopy(this.target._docFilters as any as ObjectField); },
+ initialize: (button: Doc) => { button['target-docFilters'] = this.target._docFilters instanceof ObjectField ? ObjectField.MakeCopy(this.target._docFilters as any as ObjectField) : ""; },
};
_freeform_commands = [this._viewCommand, this._saveFilterCommand, this._fitContentCommand, this._clusterCommand, this._contentCommand, this._templateCommand, this._narrativeCommand];