diff options
author | Claire <claire.github-309c@sitedethib.com> | 2021-07-13 11:07:16 +0200 |
---|---|---|
committer | Claire <claire.github-309c@sitedethib.com> | 2021-07-13 11:07:16 +0200 |
commit | 99f28c17dea35d0eec90a74c5fe95f60b6ad2f9e (patch) | |
tree | d977bc661f0c2ca33db52143c99ccf75bc44bb2e /app/javascript/flavours/glitch/features/status | |
parent | 6e3d5cbca26995e99d6ca8b1e3191edc539d87eb (diff) |
Fix scroll handling with modals
Diffstat (limited to 'app/javascript/flavours/glitch/features/status')
-rw-r--r-- | app/javascript/flavours/glitch/features/status/index.js | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/app/javascript/flavours/glitch/features/status/index.js b/app/javascript/flavours/glitch/features/status/index.js index 513a6227f..230966f2a 100644 --- a/app/javascript/flavours/glitch/features/status/index.js +++ b/app/javascript/flavours/glitch/features/status/index.js @@ -508,8 +508,7 @@ class Status 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); } render () { |