From f384ccd8a832c262f64f633a58f9a61980ef9a8e Mon Sep 17 00:00:00 2001 From: ikeq Date: Mon, 13 Sep 2021 07:07:08 +0800 Subject: [PATCH] Fix TypeError when styles don't have NumberFmt --- bits/47_styxml.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bits/47_styxml.js b/bits/47_styxml.js index 2e4e2ab..8df96bf 100644 --- a/bits/47_styxml.js +++ b/bits/47_styxml.js @@ -318,7 +318,7 @@ function parse_cellXfs(t, styles, opts) { xf[cellXF_uint[i]] = parseInt(xf[cellXF_uint[i]], 10); for(i = 0; i < cellXF_bool.length; ++i) if(xf[cellXF_bool[i]]) xf[cellXF_bool[i]] = parsexmlbool(xf[cellXF_bool[i]]); - if(xf.numFmtId > 0x188) { + if(styles.NumberFmt && xf.numFmtId > 0x188) { for(i = 0x188; i > 0x3c; --i) if(styles.NumberFmt[xf.numFmtId] == styles.NumberFmt[i]) { xf.numFmtId = i; break; } } styles.CellXf.push(xf); break;