mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-03 00:27:50 +00:00
Use the new operator with the Array constructor.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
*/
|
||||
function setToArray(set) {
|
||||
let index = -1
|
||||
const result = Array(set.size)
|
||||
const result = new Array(set.size)
|
||||
|
||||
set.forEach((value) => {
|
||||
result[++index] = value
|
||||
|
||||
Reference in New Issue
Block a user