diff options
author | bobzel <zzzman@gmail.com> | 2022-09-12 20:22:59 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2022-09-12 20:22:59 -0400 |
commit | 1ae415f3fc83edb248131f20ea4279d61a947392 (patch) | |
tree | 0c8bac461f44318700305ed904ddb61dfde5b8c2 | |
parent | f804e029a159a4cfe91f08a32301451b0aeca1f3 (diff) |
fixed exception from switch of myTrails to dashboard from userDoc
-rw-r--r-- | src/client/views/nodes/trails/PresBox.tsx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/client/views/nodes/trails/PresBox.tsx b/src/client/views/nodes/trails/PresBox.tsx index 292c187e4..c95ece3da 100644 --- a/src/client/views/nodes/trails/PresBox.tsx +++ b/src/client/views/nodes/trails/PresBox.tsx @@ -193,7 +193,9 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps>() { this.layoutDoc._gridGap = 0; this.layoutDoc._yMargin = 0; this.turnOffEdit(true); - DocListCastAsync(Doc.MyTrails.data).then(pres => !pres?.includes(this.rootDoc) && Doc.AddDocToList(Doc.MyTrails, 'data', this.rootDoc)); + if (Doc.MyTrails) { + DocListCastAsync(Doc.MyTrails.data).then(pres => !pres?.includes(this.rootDoc) && Doc.AddDocToList(Doc.MyTrails, 'data', this.rootDoc)); + } this._disposers.selection = reaction( () => SelectionManager.Views(), views => views.some(view => view.props.Document === this.rootDoc) && this.updateCurrentPresentation() |