Fix scrubber index not limited to max items count when bypassing view()

This commit is contained in:
Clark Winkelmann 2018-11-11 19:00:51 +01:00
parent 66404e1f61
commit 95f0edcd80
No known key found for this signature in database
GPG Key ID: AC336FBC86CCD80B

View File

@ -315,7 +315,7 @@ export default class PostStreamScrubber extends Component {
const visible = this.visible || 1;
const $scrubber = this.$();
$scrubber.find('.Scrubber-index').text(formatNumber(Math.ceil(index + visible)));
$scrubber.find('.Scrubber-index').text(formatNumber(Math.min(Math.ceil(index + visible), count)));
$scrubber.find('.Scrubber-description').text(this.description);
$scrubber.toggleClass('disabled', this.disabled());