Commit b21ab498 authored by Naoki Kosaka's avatar Naoki Kosaka Committed by Eugen Rochko

Fix media modal prev button behavior. (#4158)

parent 1c6c6b27
......@@ -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) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment