1
0
mirror of https://github.com/flarum/core.git synced 2025-07-18 23:31:17 +02:00

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 91e8d6820a
commit 87f94e64e4

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());