diff options
Diffstat (limited to 'src/client/views/collections')
| -rw-r--r-- | src/client/views/collections/TabDocView.tsx | 11 |
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 |
