Added short circuit for typed arrays (#3786)

This commit is contained in:
Todd Wolfson
2018-05-13 09:19:32 -07:00
committed by John-David Dalton
parent 79dc90dfcb
commit 50860fded2

View File

@@ -218,6 +218,10 @@ function baseClone(value, bitmask, customizer, key, object, stack) {
return result
}
if (isTypedArray(value)) {
return result;
}
const keysFunc = isFull
? (isFlat ? getAllKeysIn : getAllKeys)
: (isFlat ? keysIn : keys)