aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/LightboxView.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/LightboxView.tsx')
-rw-r--r--src/client/views/LightboxView.tsx6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/client/views/LightboxView.tsx b/src/client/views/LightboxView.tsx
index 0be847281..5698da785 100644
--- a/src/client/views/LightboxView.tsx
+++ b/src/client/views/LightboxView.tsx
@@ -93,7 +93,7 @@ export class LightboxView extends ObservableReactComponent<LightboxViewProps> {
savedKeys.forEach(key => {
lightDoc[key] = this._savedState[key];
});
- this._savedState = {};
+ lightDoc !== doc && (this._savedState = {});
if (doc) {
lightDoc !== doc &&
@@ -136,9 +136,7 @@ export class LightboxView extends ObservableReactComponent<LightboxViewProps> {
return this.SetLightboxDoc(
doc,
undefined,
- [...DocListCast(doc[Doc.LayoutFieldKey(doc)]), ...DocListCast(doc[Doc.LayoutFieldKey(doc) + '_annotations']).filter(anno => anno.annotationOn !== doc), ...this._future].sort(
- (a, b) => NumCast(b._timecodeToShow) - NumCast(a._timecodeToShow)
- ),
+ [...DocListCast(doc[Doc.LayoutFieldKey(doc) + '_annotations']).filter(anno => anno.annotationOn !== doc), ...this._future].sort((a, b) => NumCast(b._timecodeToShow) - NumCast(a._timecodeToShow)),
layoutTemplate
);
};