From 449bb20e6f42d0ddb837c2ba8e7d8197e887f205 Mon Sep 17 00:00:00 2001 From: pimlie Date: Mon, 17 May 2021 02:07:17 +0200 Subject: [PATCH] fix: also delete previous values if computed value was faly --- src/utils/diff.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/diff.ts b/src/utils/diff.ts index be22470..82c0b66 100644 --- a/src/utils/diff.ts +++ b/src/utils/diff.ts @@ -23,7 +23,7 @@ export function applyDifference (target: AnyObject, newSource: AnyObject, oldSou } for (const key in oldSource) { - if (!(key in newSource)) { + if (!newSource || !(key in newSource)) { delete target[key] } }