fragaria/address-formatter

Js library Uncaught TypeError

Closed this issue · 2 comments

Hi team, basically observed 2 errors
1.Uncaught TypeError: e.country_code.toUpperCase is not a function. around line 13537 like below
Eh = function(e) {
var a = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : null,
n = e.country_code && e.country_code.toUpperCase();
.......
}
I feel confused since the input argument key is 'countryCode' while here is 'country_code'

2.isInteger is not a function. around line 13598 like below
if (e.country && e.state && Number.isInteger(e.country) && (e.country = e.state, delete e.state), a && a.length) {
.......
}
isInteger is not supported by ie browser, does it also mean the formatter library does not support ie browser?

Thanks for review!

  1. Uncaught TypeError: e.country_code.toUpperCase that would mean that the country_code in that specific case is undefined or null. Do you have the address that failed?
  2. Definitely no IE support. Even Microsoft does not support it anymore.

Closing as stale. Reopen if needed