mirror of
https://github.com/n8n-io/n8n.git
synced 2025-02-02 07:01:30 -08:00
fix: Extension deep compare not quite working for some primitives (#5172)
fix: extension deep compare not quite working for some primitives
This commit is contained in:
parent
582865c7e9
commit
98017dc36f
|
@ -16,6 +16,11 @@ function deepCompare(left: unknown, right: unknown): boolean {
|
|||
return true;
|
||||
}
|
||||
|
||||
// Explicitly return false if certain primitives don't equal each other
|
||||
if (['number', 'string', 'bigint', 'boolean', 'symbol'].includes(typeof left) && left !== right) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Quickly check how many properties each has to avoid checking obviously mismatching
|
||||
// objects
|
||||
if (Object.keys(left as object).length !== Object.keys(right as object).length) {
|
||||
|
|
Loading…
Reference in a new issue