mirror of
https://github.com/flarum/framework.git
synced 2025-04-24 21:54:04 +08:00
Fix scrubber index not limited to max items count when bypassing view()
This commit is contained in:
parent
66404e1f61
commit
95f0edcd80
@ -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());
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user