From ed9e70c93ea08a602dad2b659761b4b397760dc6 Mon Sep 17 00:00:00 2001 From: Evgeny Igol Date: Tue, 28 Jan 2025 15:44:08 +0000 Subject: [PATCH] Fix default value for storeItemCheckSum is null (#568) Co-authored-by: Evgeny Igol Co-committed-by: Evgeny Igol --- word/Editor/Serialize2.js | 8 ++++---- word/Editor/custom-xml/data-binding.js | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/word/Editor/Serialize2.js b/word/Editor/Serialize2.js index 2ea7874981..4f6c255c0e 100644 --- a/word/Editor/Serialize2.js +++ b/word/Editor/Serialize2.js @@ -6828,19 +6828,19 @@ function BinaryDocumentTableWriter(memory, doc, oMapCommentId, oNumIdMap, copyPa this.WriteSdtPrDataBinding = function (val) { var oThis = this; - if (null != val.prefixMappings) { + if (undefined !== val.prefixMappings) { this.memory.WriteByte(c_oSerSdt.PrefixMappings); this.memory.WriteString2(val.prefixMappings); } - if (null != val.storeItemID) { + if (undefined !== val.storeItemID) { this.memory.WriteByte(c_oSerSdt.StoreItemID); this.memory.WriteString2(val.storeItemID); } - if (null != val.xpath) { + if (undefined !== val.xpath) { this.memory.WriteByte(c_oSerSdt.XPath); this.memory.WriteString2(val.xpath); } - if (null !== val.storeItemCheckSum) + if (undefined !== val.storeItemCheckSum) { //let strCustomXmlContent = this.Document.customXml.getContentByDataBinding(val); //val.recalculateCheckSum(strCustomXmlContent); diff --git a/word/Editor/custom-xml/data-binding.js b/word/Editor/custom-xml/data-binding.js index cdb2f7d957..7c4a30ee0c 100644 --- a/word/Editor/custom-xml/data-binding.js +++ b/word/Editor/custom-xml/data-binding.js @@ -39,10 +39,10 @@ */ function DataBinding(prefix, itemID, xpath, checkSum) { - this.prefixMappings = prefix ? prefix : undefined; - this.storeItemID = itemID ? itemID : undefined; - this.xpath = xpath ? xpath : undefined; - this.storeItemCheckSum = checkSum ? checkSum : undefined; + this.prefixMappings = prefix ? prefix : undefined; + this.storeItemID = itemID ? itemID : undefined; + this.xpath = xpath ? xpath : undefined; + this.storeItemCheckSum = checkSum ? checkSum : undefined; } DataBinding.prototype.copy = function() {