From 99f28c17dea35d0eec90a74c5fe95f60b6ad2f9e Mon Sep 17 00:00:00 2001 From: Claire Date: Tue, 13 Jul 2021 11:07:16 +0200 Subject: Fix scroll handling with modals --- app/javascript/flavours/glitch/features/account_gallery/index.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'app/javascript/flavours/glitch/features/account_gallery') 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 => { -- cgit