Fix iterating items for closet and skin library
`for...of` is a feature of ES6, however Babel will transpile this syntax to `Symbol.iterator()`, which does not supported on IE11. We won't add `Symbol` polyfill, because it will increase JS file size. `Array.prototype.reduce` is of ES5 and supported on IE11.
This commit is contained in:
parent
76b6d68bc2
commit
bec9bdf3f3
@ -60,9 +60,7 @@ function renderSkinlib(items) {
|
||||
} else {
|
||||
$('#skinlib-paginator').show();
|
||||
|
||||
for (const item of items) {
|
||||
container.append(renderSkinlibItemComponent(item));
|
||||
}
|
||||
container.html(items.reduce((carry, item) => renderSkinlibItemComponent(item), ''));
|
||||
}
|
||||
|
||||
$('.overlay').hide();
|
||||
|
@ -132,9 +132,7 @@ function renderCloset(items, category) {
|
||||
} else {
|
||||
$('#closet-paginator').show();
|
||||
|
||||
for (let item of items) {
|
||||
container.append(renderClosetItemComponent(item));
|
||||
}
|
||||
container.html(items.reduce((carry, item) => carry + renderClosetItemComponent(item), ''));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user