about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/features/account_gallery/index.js
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2021-07-13 11:07:16 +0200
committerClaire <claire.github-309c@sitedethib.com>2021-07-13 11:07:16 +0200
commit99f28c17dea35d0eec90a74c5fe95f60b6ad2f9e (patch)
treed977bc661f0c2ca33db52143c99ccf75bc44bb2e /app/javascript/flavours/glitch/features/account_gallery/index.js
parent6e3d5cbca26995e99d6ca8b1e3191edc539d87eb (diff)
Fix scroll handling with modals
Diffstat (limited to 'app/javascript/flavours/glitch/features/account_gallery/index.js')
-rw-r--r--app/javascript/flavours/glitch/features/account_gallery/index.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/app/javascript/flavours/glitch/features/account_gallery/index.js b/app/javascript/flavours/glitch/features/account_gallery/index.js
index 2a43d1ed2..83d623356 100644
--- a/app/javascript/flavours/glitch/features/account_gallery/index.js
+++ b/app/javascript/flavours/glitch/features/account_gallery/index.js
@@ -105,8 +105,7 @@ class AccountGallery extends ImmutablePureComponent {
   }
 
   shouldUpdateScroll = (prevRouterProps, { location }) => {
-    if ((((prevRouterProps || {}).location || {}).state || {}).mastodonModalOpen) return false;
-    return !(location.state && location.state.mastodonModalOpen);
+    return !(prevRouterProps?.location?.state?.mastodonModalKey || location.state?.mastodonModalKey);
   }
 
   setColumnRef = c => {