From 8ac4b0df3a346cd90f7de66464de6d4ac4dfae62 Mon Sep 17 00:00:00 2001 From: Chris Kruining Date: Mon, 27 Jan 2025 15:40:16 +0100 Subject: [PATCH] never ever ever!!! lean on type juggling. laziness has a price... --- src/utilities.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utilities.ts b/src/utilities.ts index ad834c7..a2d729a 100644 --- a/src/utilities.ts +++ b/src/utilities.ts @@ -68,13 +68,13 @@ export function* deepDiff(a: T1, b: T2, pa } for (const [[keyA, valueA], [keyB, valueB]] of zip(entriesOf(a), entriesOf(b))) { - if (keyA === undefined && keyB) { + if (keyA === undefined && keyB !== undefined) { yield { key: path.concat(keyB.toString()).join('.'), kind: MutarionKind.Create, value: valueB }; continue; } - if (keyA && keyB === undefined) { + if (keyA !== undefined && keyB === undefined) { yield { key: path.concat(keyA.toString()).join('.'), kind: MutarionKind.Delete, original: valueA }; continue;