diff options
| author | bobzel <zzzman@gmail.com> | 2023-03-10 22:25:39 -0500 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2023-03-10 22:25:39 -0500 |
| commit | b0a21edf5ffddda7caecc7774419b4f5034d815f (patch) | |
| tree | f79af35cac746938f3ef1f7e651bc4846b5f3721 /src/client/views/collections/CollectionNoteTakingView.tsx | |
| parent | f6b0ff82da9d0a64161a33fcb6e747caa13e62ef (diff) | |
fited notetaking view to create headers if they don't exist when switching from another view. Also fixed fitWidth typo for collections
Diffstat (limited to 'src/client/views/collections/CollectionNoteTakingView.tsx')
| -rw-r--r-- | src/client/views/collections/CollectionNoteTakingView.tsx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/views/collections/CollectionNoteTakingView.tsx b/src/client/views/collections/CollectionNoteTakingView.tsx index 6035871cd..fbf7db892 100644 --- a/src/client/views/collections/CollectionNoteTakingView.tsx +++ b/src/client/views/collections/CollectionNoteTakingView.tsx @@ -54,7 +54,7 @@ export class CollectionNoteTakingView extends CollectionSubView() { const needsUnsetCategory = this.childDocs.some(d => !d[this.notetakingCategoryField] && !columnHeaders?.find(sh => sh.heading === 'unset')); if (needsUnsetCategory || columnHeaders === undefined || columnHeaders.length === 0) { setTimeout(() => { - const columnHeaders = Array.from(Cast(this.dataDoc.columnHeaders, listSpec(SchemaHeaderField), null)); + const columnHeaders = Array.from(Cast(this.dataDoc.columnHeaders, listSpec(SchemaHeaderField), null) ?? []); const needsUnsetCategory = this.childDocs.some(d => !d[this.notetakingCategoryField] && !columnHeaders?.find(sh => sh.heading === 'unset')); if (needsUnsetCategory || columnHeaders.length === 0) { columnHeaders.push(new SchemaHeaderField('unset', undefined, undefined, 1)); |
