mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00: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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user