Disable text diffing when calculating state deltas

This commit is contained in:
Max Goodhart
2020-11-05 00:58:09 -08:00
parent 1c2c13dd3f
commit b1a5a3d27b

View File

@@ -19,6 +19,10 @@ export const SESSION_COOKIE_NAME = 's'
const stateDiff = createJSONDiffPatch({
objectHash: (obj, idx) => obj._id || `$$index:${idx}`,
// Disable text diffing, both because it's overkill, and because it can crash with emojis (https://github.com/google/diff-match-patch/issues/68)
textDiff: {
minLength: Infinity,
},
})
function initApp({