From 0590890a43a6ab4fe141324ad04e5cae59333f31 Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Thu, 4 Feb 2021 14:44:18 -0500
Subject: fixed back/fwd behavior with lightbox

---
 src/client/views/MainView.tsx | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'src/client/views/MainView.tsx')

diff --git a/src/client/views/MainView.tsx b/src/client/views/MainView.tsx
index 9d9698c9c..5873ce650 100644
--- a/src/client/views/MainView.tsx
+++ b/src/client/views/MainView.tsx
@@ -662,7 +662,8 @@ export class MainView extends React.Component {
                     <div className="mainView-lightBox-navBtn" style={{ top: window.innerHeight / 2 - 12.50 }}
                         onClick={action(e => {
                             e.stopPropagation();
-                            if (this.lightboxHistory.lastElement() !== this.lightboxFuture.lastElement()) this.lightboxFuture.push(this.lightboxHistory.pop());
+                            const popped = this.lightboxHistory.pop();
+                            if (this.lightboxHistory.lastElement() !== this.lightboxFuture.lastElement()) this.lightboxFuture.push(popped);
                             this.LightboxDoc = this.lightboxHistory.lastElement();
                         })}>
                         <FontAwesomeIcon icon={"chevron-left"} size="3x" />
-- 
cgit v1.2.3-70-g09d2

