mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
add toJSON
check to NodeErrors.isTraversableObject as well
This commit is contained in:
parent
6c60c72934
commit
b0e2b188d5
|
@ -176,8 +176,12 @@ abstract class NodeError extends ExecutionBaseError {
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
protected isTraversableObject(value: any): value is JsonObject {
|
protected isTraversableObject(value: any): value is JsonObject {
|
||||||
return (
|
return (
|
||||||
|
value &&
|
||||||
|
typeof value === 'object' &&
|
||||||
|
!Array.isArray(value) &&
|
||||||
|
typeof value.toJSON !== 'function' &&
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
||||||
value && typeof value === 'object' && !Array.isArray(value) && !!Object.keys(value).length
|
!!Object.keys(value).length
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue