FIX: less fancy pages computation for browser compatibility (#6823)

This commit is contained in:
Joffrey JAFFEUX 2018-12-28 19:07:29 +01:00 committed by GitHub
parent 4f6ca66df5
commit 0f09cb50e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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,