From 35d10f764ae2e31a501cd3e2c27a773d5ee465b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Sat, 18 May 2019 09:16:41 -0400 Subject: [PATCH] fix: #7619 --- src/posts/diffs.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/posts/diffs.js b/src/posts/diffs.js index 13a10eaca2..38c4949f11 100644 --- a/src/posts/diffs.js +++ b/src/posts/diffs.js @@ -98,9 +98,11 @@ function postDiffLoad(data) { // Replace content with re-constructed content from that point in time data.post.content = data.diffs.reduce(function (content, currentDiff) { - return diff.applyPatch(content, currentDiff.patch, { + const result = diff.applyPatch(content, currentDiff.patch, { fuzzFactor: 1, }); + + return typeof result === 'string' ? result : content; }, data.post.content); // Clear editor data (as it is outdated for this content)