From bbaac89eb080e6f0a5832de2333025d0c4be2209 Mon Sep 17 00:00:00 2001 From: geta6 Date: Tue, 16 May 2017 19:12:38 +0900 Subject: [PATCH] Enable to handle app immediately after closing modal (#3082) --- app/javascript/mastodon/features/ui/components/modal_root.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/javascript/mastodon/features/ui/components/modal_root.js b/app/javascript/mastodon/features/ui/components/modal_root.js index 3596b2812..c4015a119 100644 --- a/app/javascript/mastodon/features/ui/components/modal_root.js +++ b/app/javascript/mastodon/features/ui/components/modal_root.js @@ -48,9 +48,10 @@ class ModalRoot extends React.PureComponent { render () { const { type, props, onClose } = this.props; + const visible = !!type; const items = []; - if (!!type) { + if (visible) { items.push({ key: type, data: { type, props }, @@ -69,7 +70,7 @@ class ModalRoot extends React.PureComponent { const SpecificComponent = MODAL_COMPONENTS[type]; return ( -
+