aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2022-05-16 19:33:08 -0400
committerbobzel <zzzman@gmail.com>2022-05-16 19:33:08 -0400
commit09c7ee4120f48e212f9b64fd3e307c8ce49e0cfd (patch)
tree92f53258cb93026e937edcf2035c48b4ab59a153
parent1bff8efd7386d0edd19105d682c0d22fc410bb30 (diff)
fixed snapshot to set 'context' of new aliases.
-rw-r--r--src/client/views/collections/CollectionDockingView.tsx5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/client/views/collections/CollectionDockingView.tsx b/src/client/views/collections/CollectionDockingView.tsx
index 64a5f38d4..30f60bba6 100644
--- a/src/client/views/collections/CollectionDockingView.tsx
+++ b/src/client/views/collections/CollectionDockingView.tsx
@@ -404,7 +404,10 @@ export class CollectionDockingView extends CollectionSubView() {
const origtabdocs = DocListCast(origtab.data);
const newtab = origtabdocs.length ? Doc.MakeCopy(origtab, true, undefined, true) : Doc.MakeAlias(origtab);
const newtabdocs = origtabdocs.map(origtabdoc => Doc.MakeAlias(origtabdoc));
- newtabdocs.length && (Doc.GetProto(newtab).data = new List<Doc>(newtabdocs));
+ if (newtabdocs.length) {
+ Doc.GetProto(newtab).data = new List<Doc>(newtabdocs);
+ newtabdocs.forEach(ntab => ntab.context = newtab);
+ }
json = json.replace(origtab[Id], newtab[Id]);
return newtab;
});