]> cat aescling's git repositories - mastodon.git/commitdiff
Do not count search route as compose being mounted in web UI (#7372)
authorEugen Rochko <eugen@zeonfederated.com>
Sat, 5 May 2018 21:05:43 +0000 (23:05 +0200)
committerGitHub <noreply@github.com>
Sat, 5 May 2018 21:05:43 +0000 (23:05 +0200)
Fix #7144

app/javascript/mastodon/features/compose/index.js

index 67f0e798157da430c076c9db341705346b5fe022..19aae03322b1a9339922608b44c530247b406baa 100644 (file)
@@ -43,11 +43,19 @@ export default class Compose extends React.PureComponent {
   };
 
   componentDidMount () {
-    this.props.dispatch(mountCompose());
+    const { isSearchPage } = this.props;
+
+    if (!isSearchPage) {
+      this.props.dispatch(mountCompose());
+    }
   }
 
   componentWillUnmount () {
-    this.props.dispatch(unmountCompose());
+    const { isSearchPage } = this.props;
+
+    if (!isSearchPage) {
+      this.props.dispatch(unmountCompose());
+    }
   }
 
   onFocus = () => {