This commit is contained in:
Angelos Chalaris
2019-01-12 11:07:04 +02:00
committed by GitHub
parent 09e2709fa4
commit 4e39c4020b

View File

@ -12,7 +12,7 @@ const deepClone = obj => {
Object.keys(clone).forEach(
key => (clone[key] = typeof obj[key] === 'object' ? deepClone(obj[key]) : obj[key])
);
return Array.isArray(obj) ? Array.from({ length: obj.length }) : clone;
return Array.isArray(obj) ? Array.from(obj) : clone;
};
```