0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-01 23:52:40 +00:00

Merge pull request #4347 from G-Ambatte/experimentalDiffSaveFix

Diff patching fix using encodeURI
This commit is contained in:
Trevor Buckner
2025-07-19 15:30:10 -04:00
committed by GitHub
2 changed files with 2 additions and 2 deletions

View File

@@ -375,7 +375,7 @@ const api = {
try {
const patches = parsePatch(brewFromClient.patches);
// Patch to a throwaway variable while parallelizing - we're more concerned with error/no error.
const patchedResult = applyPatches(patches, brewFromServer.text, { allowExceedingIndices: true })[0];
const patchedResult = decodeURI(applyPatches(patches, encodeURI(brewFromServer.text))[0]);
if(patchedResult != brewFromClient.text)
throw("Patches did not apply cleanly, text mismatch detected");
// brew.text = applyPatches(patches, brewFromServer.text)[0];