diff options
| author | Bob Zeleznik <zzzman@gmail.com> | 2020-07-26 10:15:59 -0400 |
|---|---|---|
| committer | Bob Zeleznik <zzzman@gmail.com> | 2020-07-26 10:15:59 -0400 |
| commit | 5fb6e6348b73c81c4f7900f819fc55fcffe2f661 (patch) | |
| tree | 771fc05d8bcf4ce89aa589e4f6bccae02c8bff64 /src/client | |
| parent | 0fead8a6b66a08d63d57ffc741d1854011070b69 (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.tsx | 2 |
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]; |
