From bced7a6f8d3938cb47e0d31e147f3a2ae8505c7f Mon Sep 17 00:00:00 2001 From: Aymeric Date: Wed, 13 Jan 2016 19:02:35 +0100 Subject: [PATCH] substr() doesn't work properly with IE8 Use slice() instead of substr() to make it work with IE8 --- xlsx.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xlsx.js b/xlsx.js index c29f5ce..aa0e3c3 100644 --- a/xlsx.js +++ b/xlsx.js @@ -651,7 +651,7 @@ function eval_fmt(fmt, v, opts, flen) { case '[': o = c; while(fmt[i++] !== ']' && i < fmt.length) o += fmt[i]; - if(o.substr(-1) !== ']') throw 'unterminated "[" block: |' + o + '|'; + if(o.slice(-1) !== ']') throw 'unterminated "[" block: |' + o + '|'; if(o.match(abstime)) { if(dt==null) { dt=parse_date_code(v, opts); if(dt==null) return ""; } out[out.length] = {t:'Z', v:o.toLowerCase()}; -- 2.34.1