diff --git a/src/components/skins.js b/src/components/skins.js index 6a2e4eb..2ad24b6 100644 --- a/src/components/skins.js +++ b/src/components/skins.js @@ -29,7 +29,8 @@ export default class Skins extends React.Component { return
- {Array(6).fill().map((_, i) => { + {/* Use Array.prototype.fill() when it is more widely supported. */} + {[...Array(6)].map((_, i) => { var skinTone = i + 1, selected = skinTone == skin diff --git a/src/utils/frequently.js b/src/utils/frequently.js index e4e41c1..d1fb696 100644 --- a/src/utils/frequently.js +++ b/src/utils/frequently.js @@ -37,7 +37,8 @@ function get(perLine) { if (!frequently) { defaults = {} - return Array(perLine).fill('').map((_, i) => { + // Use Array.prototype.fill() when it is more widely supported. + return [...Array(perLine)].map((_, i) => { defaults[DEFAULTS[i]] = perLine - i return DEFAULTS[i] })