mirror of
https://github.com/moghtech/komodo.git
synced 2026-05-12 23:38:53 -05:00
fix deep compare short path for falsy / null
This commit is contained in:
@@ -357,6 +357,11 @@ export function listsEqual(a: string[], b: string[]) {
|
||||
* @returns a === b
|
||||
*/
|
||||
export function deepCompare(a: any, b: any) {
|
||||
// Short path for falsy. Important to catch typeof null === "object" edge case.
|
||||
if (!a || !b) {
|
||||
return a === b;
|
||||
}
|
||||
|
||||
const ta = typeof a;
|
||||
const tb = typeof b;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user