aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/LightboxView.tsx
diff options
context:
space:
mode:
authorGeireann <60007097+geireann@users.noreply.github.com>2021-04-07 14:45:14 -0400
committerGeireann <60007097+geireann@users.noreply.github.com>2021-04-07 14:45:14 -0400
commit6a73699a10edb842b2b5eba4ef05731772859f13 (patch)
tree836ba0e898b4362db1be6328803bed3bae2eaa84 /src/client/views/LightboxView.tsx
parent1998ed060c1e8a75cbfad0a4b883a6c9daa83a81 (diff)
bug fixes
Diffstat (limited to 'src/client/views/LightboxView.tsx')
-rw-r--r--src/client/views/LightboxView.tsx7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/client/views/LightboxView.tsx b/src/client/views/LightboxView.tsx
index 2fd9cb854..efd3d733f 100644
--- a/src/client/views/LightboxView.tsx
+++ b/src/client/views/LightboxView.tsx
@@ -188,10 +188,13 @@ export class LightboxView extends React.Component<LightboxViewProps> {
LightboxView._future?.push(...DocListCast(tours[0][fieldKey]).reverse());
} else {
const coll = LightboxView._docTarget;
- if (coll) {
+ const doc = LightboxView.LightboxDoc;
+ if (coll && doc) {
console.log('test');
+ console.log('target: ' + coll.title);
+ console.log('doc: ' + doc.title);
const fieldKey = Doc.LayoutFieldKey(coll);
- LightboxView.SetLightboxDoc(coll, undefined);
+ LightboxView.SetLightboxDoc(doc);
// LightboxView.SetLightboxDoc(coll, undefined, [...DocListCast(coll[fieldKey]), ...DocListCast(coll[fieldKey + "-annotations"])]);
TabDocView.PinDoc(coll, { hidePresBox: true });
}