I've been getting an error when I open my Website Information in Dynamics 365 Portals. The Error is attached but it says the following:
There was an error with this field's customized event.
Field:window
Event:onload
Error:Unable to get property 'length' of undefined or null reference
I was able to find the window.onload function in the Header Template source, however there is no call to get the length property (Screenshot of this code is also provided). I've changed some code in other places but have not touched this. I also tried reverting all of my changes to see where this issue occurred but it persisted no matter what I changed.
I don't understand what's going wrong here and have no idea how to move forward with fixing it. Any help would be appreciated!