From 2cdd09f8016ad5a5355be9d3ad21d5df9e2ca170 Mon Sep 17 00:00:00 2001 From: SheetJS Date: Sat, 9 Nov 2013 13:14:57 -0800 Subject: [PATCH] browser cleanup utils should not be leaked --- .npmignore | 2 ++ xlsx.js | 10 +++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.npmignore b/.npmignore index dcaf716..f861188 100644 --- a/.npmignore +++ b/.npmignore @@ -1 +1,3 @@ +test_files/ +tests/files/ index.html diff --git a/xlsx.js b/xlsx.js index f2fd59c..1c030f8 100644 --- a/xlsx.js +++ b/xlsx.js @@ -672,7 +672,7 @@ function parseCT(data) { if(!data) return data; var ct = { workbooks: [], sheets: [], calcchains: [], themes: [], styles: [], coreprops: [], extprops: [], strs:[], xmlns: "" }; - data.match(/<[^>]*>/g).forEach(function(x) { + (data.match(/<[^>]*>/g)||[]).forEach(function(x) { var y = parsexmltag(x); switch(y[0]) { case '