about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authorNaoki Kosaka <n.k@mail.yukimochi.net>2017-07-12 02:56:45 +0900
committerEugen Rochko <eugen@zeonfederated.com>2017-07-11 19:56:45 +0200
commitb21ab498f84b75288f20a7eb2c6e0ee223481674 (patch)
treec3d4b607d6a82ec23b7b86901738705b409f581f /app
parent1c6c6b271cb361b75a33bc98c8f26d18ea9af23f (diff)
Fix media modal prev button behavior. (#4158)
Diffstat (limited to 'app')
-rw-r--r--app/javascript/mastodon/features/ui/components/media_modal.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/javascript/mastodon/features/ui/components/media_modal.js b/app/javascript/mastodon/features/ui/components/media_modal.js
index 23f588669..d869fffa6 100644
--- a/app/javascript/mastodon/features/ui/components/media_modal.js
+++ b/app/javascript/mastodon/features/ui/components/media_modal.js
@@ -35,7 +35,7 @@ export default class MediaModal extends ImmutablePureComponent {
   }
 
   handlePrevClick = () => {
-    this.setState({ index: (this.getIndex() - 1) % this.props.media.size });
+    this.setState({ index: (this.props.media.size + this.getIndex() - 1) % this.props.media.size });
   }
 
   handleKeyUp = (e) => {