I am trying to figure out a JS error I am receiving in a Magento e-commerce extension that I paid good money for, but support has been lacking on their end to fix this. Error causes a spinning wheel of doom on page load that never goes away.
The following is the error I receive in the developer console:
Uncaught TypeError: data.some is not a function
at findFirst (select.js:67)
at UiClass.normalizeData (select.js:193)
at UiClass.normalizeData (wrapper.js:109)
at UiClass.getInitialValue (abstract.js:200)
at UiClass.setInitialValue (abstract.js:143)
at UiClass._super (wrapper.js:106)
at UiClass.setInitialValue (select.js:302)
at UiClass.setInitialValue (wrapper.js:109)
at UiClass.initialize (abstract.js:70)
at UiClass.initialize (wrapper.js:109)
This is the code section at line 67 of select.js data.some(function (node) { the error is referencing:
/**
* Recursively loops over data to find non-undefined, non-array value
*
* @param {Array} data
* @return {*} - first non-undefined value in array
*/
function findFirst(data) {
var value;
data.some(function (node) {
value = node.value;
if (Array.isArray(value)) {
value = findFirst(value);
}
return !_.isUndefined(value);
});
return value;
}
I am hoping this is just some kind of typo error that I might be able to fix on my own?
Thanks in advance for any help.
P.S. I am a coding novice.