Getting a lot of these errors which is causing an ...
# suitescript
e
Getting a lot of these errors which is causing an issue with a suitelet. Has anyone seen this before?
Copy code
ResourceTiming.js:33 Uncaught TypeError: Cannot read property 'length' of undefined
    at Performance.NLRUM.onRestimingBufferFull (ResourceTiming.js:33)
t
it just simply says that whatever that variable that you get the length to is having a undefine value. Try to check first if that variable return any
e
it's NS code, not mine. I understand the error, just curious if anyone else has seen it before I put a case in. they're assuming the arrays are valid before checking the length
Copy code
NLRUM.onRestimingBufferFull = function() {
	if (NLRUM.bResourceTimingDataCollection > 0)
	{
		if (NLRUM.pendingActions.length > 0 || NLRUM.actionEntries.length > 0 || (Object.keys(NLRUM.pendingBrowserEntry).length > 0 && NLRUM.pendingBrowserEntry.resourceMatchEndTime && NLRUM.pendingBrowserEntry.resourceMatchEndTime > Date.now()))
		{
			NLRUM.resourceMapping();
		}
		else
		{
			NLRUM.sendResTiming();
			NLRUM.clearResourceTimings(true);
		}
	}
};
s
NS isn't very good at validating inputs to their internal code. I'd try and track the stack trace back to what is your code and dig in to see of anything is awry at that stack frame.
e
There are no exceptions in my code before this is thrown, and I'm certainly not trying to modify those arrays. The error is thrown on a mousewheel event as well.
This was caused by uBlock Origin (chrome extension).