From bbbb65e60e043c8a60d362a6baa84e71dd4d2254 Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Wed, 10 Jun 2020 18:04:16 -0700 Subject: [PATCH] Avoid unnecessary use of fill(null) Where we can just use a spread-syntax array copy for the same effect, (namely, ensuring an array has actual items (even if undefined) rather than "empty" so that map() actually does something). --- empathy/empathy.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/empathy/empathy.jsx b/empathy/empathy.jsx index 21b766a..cd5f342 100644 --- a/empathy/empathy.jsx +++ b/empathy/empathy.jsx @@ -368,7 +368,7 @@ class ActivePrompt extends React.PureComponent {

{this.props.prompt.prompt}

- {Array(this.props.prompt.items).fill(null).map((whocares,i) => { + {[...Array(this.props.prompt.items)].map((whocares,i) => { return (