mirror of
https://github.com/discourse/discourse.git
synced 2024-12-02 05:29:17 -06:00
FIX: less fancy pages computation for browser compatibility (#6823)
This commit is contained in:
parent
4f6ca66df5
commit
0f09cb50e9
@ -106,7 +106,12 @@ export default Ember.Component.extend({
|
||||
pages(data, perPage, page) {
|
||||
if (!data || data.length <= perPage) return [];
|
||||
|
||||
let pages = [...Array(Math.ceil(data.length / perPage)).keys()].map(v => {
|
||||
const pagesIndexes = [];
|
||||
for (let i = 0; i < Math.ceil(data.length / perPage); i++) {
|
||||
pagesIndexes.push(i);
|
||||
}
|
||||
|
||||
let pages = pagesIndexes.map(v => {
|
||||
return {
|
||||
page: v + 1,
|
||||
index: v,
|
||||
|
Loading…
Reference in New Issue
Block a user