From f0d2a990c8776f0527fec4bb482b5d44bca23124 Mon Sep 17 00:00:00 2001 From: Tomohiro Arakawa Date: Fri, 14 May 2021 01:24:48 -0400 Subject: [PATCH] Fix bug in diff function --- src/core.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core.ts b/src/core.ts index b9c43e6..d3c816b 100644 --- a/src/core.ts +++ b/src/core.ts @@ -71,7 +71,7 @@ export function diff(document1: Document, document2: Document): Change { change[key] = diff(document1[key], document2[key]); } // Otherwise, just copy the content to change - else { + else if (document1[key] !== document2[key]) { change[key] = document2[key]; } }