about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authorabcang <abcang1015@gmail.com>2017-09-24 18:15:11 +0900
committerEugen Rochko <eugen@zeonfederated.com>2017-09-24 11:15:11 +0200
commite756c4f5ec4719b0fe41df77abea56dda317b491 (patch)
treea1b389753653fb5e61c2ae59134515df15bd4e49 /app
parenta0bbeafb045441543f7bb9f959e7af184550f7d3 (diff)
Fix media spoiler of DetailedStatus (#5071)
Diffstat (limited to 'app')
-rw-r--r--app/javascript/mastodon/components/media_gallery.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/javascript/mastodon/components/media_gallery.js b/app/javascript/mastodon/components/media_gallery.js
index d84e4229c..52b34971b 100644
--- a/app/javascript/mastodon/components/media_gallery.js
+++ b/app/javascript/mastodon/components/media_gallery.js
@@ -1,6 +1,7 @@
 import React from 'react';
 import ImmutablePropTypes from 'react-immutable-proptypes';
 import PropTypes from 'prop-types';
+import { is } from 'immutable';
 import IconButton from './icon_button';
 import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
 import { isIOS } from '../is_mobile';
@@ -196,7 +197,7 @@ export default class MediaGallery extends React.PureComponent {
   };
 
   componentWillReceiveProps (nextProps) {
-    if (nextProps.sensitive !== this.props.sensitive) {
+    if (!is(nextProps.media, this.props.media)) {
       this.setState({ visible: !nextProps.sensitive });
     }
   }