javascript-number-formatter icon indicating copy to clipboard operation
javascript-number-formatter copied to clipboard

IE11 not supported

Open legovadim opened this issue 6 years ago • 6 comments

image

SCRIPT1002: Syntax error

legovadim avatar Jan 04 '19 16:01 legovadim

Hi @legovadim!

Thanks for letting me know! When I get some time, I'll get this fixed.

Mottie avatar Jan 08 '19 01:01 Mottie

Ok I found the problem. Assign of default value of a paramaeter of a function is not supported by IE11: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Default_parameters

Simply change the following: function processMask(mask = "#.##") {...

by function processMask(mask) { if (mask == null) { mask = "#.##"; } ... }

I hope it'll works and please, make the change quickly (plzzzz!!!!) because my app don't work any more in IE11... Many thanks !!

obtdap avatar Jan 28 '19 15:01 obtdap

Sorry for the long delay.... v2.0.8 is now available. I added babel to the rollup config, but I didn't get a chance to test the resulting file: format.es5.js. Please let me know if you encounter any issues.

Mottie avatar Jan 29 '19 04:01 Mottie

Sorry for the long delay.... v2.0.8 is now available. I added babel to the rollup config, but I didn't get a chance to test the resulting file: format.es5.js. Please let me know if you encounter any issues.

Perfect ! I tried with the es5 and it works perfectly ! Many many thanks, I love your library :)

For me you can close the bug.

obtdap avatar Jan 29 '19 08:01 obtdap

HI , I use the latest version v2.0.8, still not work in IE11, throw SCRIPT1002

Eflet avatar Mar 21 '19 10:03 Eflet

Please make sure you're using format.es5.js... if you're using require, try this:

var format = require("./node_modules/number-format.js/lib/format.es5");

Mottie avatar Mar 21 '19 11:03 Mottie