mirror of
https://github.com/flarum/core.git
synced 2025-07-18 15:21:16 +02:00
Fix scrubber index not limited to max items count when bypassing view()
This commit is contained in:
@@ -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());
|
||||
|
||||
|
Reference in New Issue
Block a user