cldrjs icon indicating copy to clipboard operation
cldrjs copied to clipboard

coreLoad() E_INVALID_PAR_TYPE error

Open clazette opened this issue 9 years ago • 1 comments

I am loading 9 CLDR JSON data files. During the call to Globalize.load, when cldrjs.load is called, the validateTypePlainObject check is failing. Each $.getJSON call returns an array containing three items. Items at index positions 0 and 2 are objects, the item at index position 1 is a string of, in this case, "success". Therefore, when the second iteration of the loop occurs, and the isPlainObject function is called within the validatePlainTypeObject call, "success" obviously causes the validation to fail because it's not an object.

What am I doing incorrectly?

image

image

clazette avatar Sep 22 '16 15:09 clazette

It looks like it's not cldr.js' fault. It appears to be this code from one of the examples. Now, I just need to resolve the issue.

// Normalize $.get results, we only need the JSON, not the request statuses. return [].slice.apply(arguments, [0]).map(function (result) { return result[0]; });

clazette avatar Sep 22 '16 16:09 clazette