aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections
diff options
context:
space:
mode:
authorJenny Yu <jennyyu212@outlook.com>2022-09-12 19:16:57 -0400
committerJenny Yu <jennyyu212@outlook.com>2022-09-12 19:16:57 -0400
commita2820ffc0c9fd8323fa2f9a9ae5334da4c72283b (patch)
tree0bc9b6e686841ef2485f443b1aa943e33580ce39 /src/client/views/collections
parent5628b585fa6356d66cf2e7454be20e3b847ad22e (diff)
breaking: made trails belong to dashboard instead of userdoc
Diffstat (limited to 'src/client/views/collections')
-rw-r--r--src/client/views/collections/TabDocView.tsx11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/client/views/collections/TabDocView.tsx b/src/client/views/collections/TabDocView.tsx
index b8aaea622..7614154c0 100644
--- a/src/client/views/collections/TabDocView.tsx
+++ b/src/client/views/collections/TabDocView.tsx
@@ -214,8 +214,15 @@ export class TabDocView extends React.Component<TabDocViewProps> {
const docList = docs instanceof Doc ? [docs] : docs;
const batch = UndoManager.StartBatch('pinning doc');
- // all docs will be added to the ActivePresentation as stored on CurrentUserUtils
- const curPres = Doc.ActivePresentation;
+ let curPres = Doc.ActivePresentation
+ console.log(curPres)
+ // let curPres = Doc.ActiveDashboard!['presentation']
+ if (!curPres) {
+ curPres = Doc.MakeCopy(Doc.UserDoc().emptyPresentation as Doc, true);
+ Doc.ActivePresentation = curPres
+ // Doc.ActiveDashboard!['presentation'] = curPres
+ }
+
curPres &&
docList.forEach(doc => {
// Edge Case 1: Cannot pin document to itself