mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
fix(core): augmentObject should clone Buffer/Uint8Array instead of wrapping them in a proxy (#5902)
This commit is contained in:
committed by
GitHub
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;
|
||||
|
||||
Reference in New Issue
Block a user