Skip to content

Commit

Permalink
FIX: less fancy pages computation for browser compatibility (#6823)
Browse files Browse the repository at this point in the history
  • Loading branch information
jjaffeux committed Dec 28, 2018
1 parent 4f6ca66 commit 0f09cb5
Showing 1 changed file with 6 additions and 1 deletion.
Expand Up @@ -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,
Expand Down

0 comments on commit 0f09cb5

Please sign in to comment.