diff options
author | Naoki Kosaka <n.k@mail.yukimochi.net> | 2017-07-12 02:56:45 +0900 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-07-11 19:56:45 +0200 |
commit | b21ab498f84b75288f20a7eb2c6e0ee223481674 (patch) | |
tree | c3d4b607d6a82ec23b7b86901738705b409f581f | |
parent | 1c6c6b271cb361b75a33bc98c8f26d18ea9af23f (diff) |
Fix media modal prev button behavior. (#4158)
-rw-r--r-- | app/javascript/mastodon/features/ui/components/media_modal.js | 2 |
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) => { |