mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-08 18:17:48 +00:00
Ensure shallow clones of typed arrays don't clone the buffer.
This commit is contained in:
@@ -1426,7 +1426,8 @@
|
||||
if (Ctor instanceof Ctor) {
|
||||
Ctor = ctorByClass[className];
|
||||
}
|
||||
return new Ctor(cloneBuffer(value.buffer), value.byteOffset, value.length);
|
||||
var buffer = value.buffer;
|
||||
return new Ctor(isDeep ? cloneBuffer(buffer) : buffer, value.byteOffset, value.length);
|
||||
|
||||
case numberClass:
|
||||
case stringClass:
|
||||
|
||||
Reference in New Issue
Block a user