mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-10 06:34:05 -08:00
fix(core): augmentObject
should clone Buffer/Uint8Array instead of wrapping them in a proxy (#5902)
This commit is contained in:
parent
f4e59499fc
commit
a72173414d
|
@ -7,6 +7,7 @@ const augmentedObjects = new WeakSet<object>();
|
|||
function augment<T>(value: T): T {
|
||||
if (typeof value !== 'object' || value === null || value instanceof RegExp) return value;
|
||||
if (value instanceof Date) return new Date(value.valueOf()) as T;
|
||||
if (value instanceof Uint8Array) return value.slice() as T;
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
||||
if (Array.isArray(value)) return augmentArray(value) as T;
|
||||
|
|
Loading…
Reference in a new issue