Move normalization to before diffing

This commit is contained in:
David Bolack committed 2025-07-09 19:37:57 -05:00
1 parent 81e20f032e
commit a02361ee65
2 files changed
+10 -7

No files matched your search

+2 -1
View File
@@ -339,9 +339,10 @@ const api = {
// Initialize brew from request and body, destructure query params, and set the initial value for the after-save method
const brewFromClient = api.excludePropsFromUpdate(req.body);
const brewFromServer = req.brew;
brewFromServer.text = brewFromServer.text.normalize();
splitTextStyleAndMetadata(brewFromServer);
brewFromServer.hash = await md5(brewFromServer.text.normalize());
brewFromServer.hash = await md5(brewFromServer.text);
if((brewFromServer?.version !== brewFromClient?.version) || (brewFromServer?.hash !== brewFromClient?.hash)) {
if(brewFromClient?.version !== brewFromClient?.version)