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) {
|
pages(data, perPage, page) {
|
||||||
if (!data || data.length <= perPage) return [];
|
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 {
|
return {
|
||||||
page: v + 1,
|
page: v + 1,
|
||||||
index: v,
|
index: v,
|
||||||
|
|
Loading…
Reference in New Issue