From f07a3d5fc0d7d7002d007a0753dc5c8f3f9d9798 Mon Sep 17 00:00:00 2001 From: reviewher Date: Sat, 11 Sep 2021 00:13:02 -0700 Subject: [PATCH] XLSX Comment Parse Safeguard [ci skip] --- bits/57_cmntxml.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bits/57_cmntxml.js b/bits/57_cmntxml.js index 229d3c1..04eeefa 100644 --- a/bits/57_cmntxml.js +++ b/bits/57_cmntxml.js @@ -23,7 +23,7 @@ function parse_comments_xml(data/*:string*/, opts)/*:Array*/ { var rt = !!textMatch && !!textMatch[1] && parse_si(textMatch[1]) || {r:"",t:"",h:""}; comment.r = rt.r; if(rt.r == "") rt.t = rt.h = ""; - comment.t = rt.t.replace(/\r\n/g,"\n").replace(/\r/g,"\n"); + comment.t = (rt.t||"").replace(/\r\n/g,"\n").replace(/\r/g,"\n"); if(opts.cellHTML) comment.h = rt.h; commentList.push(comment); });