0

I am getting this javascript error from numeral.js (1.5.3) when our js files are minified.

Uncaught TypeError: Cannot read property 'length' of undefined.

Since it's minified I am not exactly sure on what line the error is, but when I click on the error message in chrome, the cursor goes here, so I am guessing this is the 'length' thats failing.

..... A=A.split(".")[1].length?o[p].delimiters.decimal+A.split(".")[1]:"".....

This is where the call to numeral.js is made.

        var percentage = '3.98385103884072E-03';
        var formattedPct = numeral(Math.abs(percentage)).format('0.0000'); 

It works fine when the files are not minified. Any idea where should I look into?

Thanks.

Kessy
  • 1,894
  • 1
  • 8
  • 15
user471317
  • 1,231
  • 2
  • 22
  • 35

0 Answers0