chromefill icon indicating copy to clipboard operation
chromefill copied to clipboard

Regression where JS objects are mutated with polyfill code implementation

Open InterLinked1 opened this issue 8 months ago • 0 comments

Noticed some strange behavior in https://github.com/InterLinked1/wssmail, since commit a71389ac10b445784264c263dafb4be3133b1472

webmail.js:1913 Uncaught TypeError: Cannot read properties of undefined (reading 'indexOf')
    at displayFolderName (webmail.js:1913:26)
    at addToFolderMenu (webmail.js:606:17)
    at drawFolderMenu (webmail.js:1974:3)
    at handleMessage (webmail.js:2244:4)
    at ws.onmessage (webmail.js:451:3)

Attempting to print the folders object/array in the console succeeds but also has "undefined" after it.

When logging the individual stray objects that appear, the code in the toReversed and 2x the toSpliced polyfills appears as the object.

InterLinked1 avatar Apr 29 '25 02:04 InterLinked1