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