mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-27 09:06:15 +01:00
fix: #7619
This commit is contained in:
@@ -98,9 +98,11 @@ function postDiffLoad(data) {
|
|||||||
|
|
||||||
// Replace content with re-constructed content from that point in time
|
// Replace content with re-constructed content from that point in time
|
||||||
data.post.content = data.diffs.reduce(function (content, currentDiff) {
|
data.post.content = data.diffs.reduce(function (content, currentDiff) {
|
||||||
return diff.applyPatch(content, currentDiff.patch, {
|
const result = diff.applyPatch(content, currentDiff.patch, {
|
||||||
fuzzFactor: 1,
|
fuzzFactor: 1,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
return typeof result === 'string' ? result : content;
|
||||||
}, data.post.content);
|
}, data.post.content);
|
||||||
|
|
||||||
// Clear editor data (as it is outdated for this content)
|
// Clear editor data (as it is outdated for this content)
|
||||||
|
|||||||
Reference in New Issue
Block a user