diff --git a/app/javascript/mastodon/components/media_gallery.js b/app/javascript/mastodon/components/media_gallery.js
index 92b1825bf..439588735 100644
--- a/app/javascript/mastodon/components/media_gallery.js
+++ b/app/javascript/mastodon/components/media_gallery.js
@@ -135,7 +135,7 @@ class MediaGallery extends React.PureComponent {
   };
 
   state = {
-    visible: !props.sensitive
+    visible: !this.props.sensitive
   };
 
   handleOpen = (e) => {