From a2820ffc0c9fd8323fa2f9a9ae5334da4c72283b Mon Sep 17 00:00:00 2001 From: Jenny Yu Date: Mon, 12 Sep 2022 19:16:57 -0400 Subject: breaking: made trails belong to dashboard instead of userdoc --- src/client/views/collections/TabDocView.tsx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/client/views/collections') 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 { 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 -- cgit v1.2.3-70-g09d2