You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
p5.js:74778 Uncaught TypeError: func.substring is not a function
at mapToReference (p5.js:74778:34)
at p5._report (p5.js:74821:19)
at p5._friendlyError (p5.js:74859:12)
at checkForUserDefinedFunctions (p5.js:74989:16)
mapToReference @ p5.js:74778
p5._report @ p5.js:74821
p5._friendlyError @ p5.js:74859
checkForUserDefinedFunctions @ p5.js:74989
p5.js:68523 Uncaught TypeError: Cannot read properties of undefined (reading 'pixels')
at get pixels (p5.js:68523:29)
at p5.js:75668:27
at Array.map (<anonymous>)
at getSymbols (p5.js:75665:12)
at defineMisusedAtTopLevelCode (p5.js:75680:9)
at helpForMisusedAtTopLevelCode (p5.js:75713:9)
get pixels @ p5.js:68523
(anonymous) @ p5.js:75668
getSymbols @ p5.js:75665
defineMisusedAtTopLevelCode @ p5.js:75680
helpForMisusedAtTopLevelCode @ p5.js:75713
p5.js:74778 Uncaught TypeError: func.substring is not a function
at mapToReference (p5.js:74778:34)
at p5._report (p5.js:74821:19)
at p5._friendlyError (p5.js:74859:12)
at checkForUserDefinedFunctions (p5.js:74989:16)
mapToReference @ p5.js:74778
p5._report @ p5.js:74821
p5._friendlyError @ p5.js:74859
checkForUserDefinedFunctions @ p5.js:74989
p5.js:68523 Uncaught TypeError: Cannot read properties of undefined (reading 'pixels')
at get pixels (p5.js:68523:29)
at p5.js:75668:27
at Array.map (<anonymous>)
at getSymbols (p5.js:75665:12)
at defineMisusedAtTopLevelCode (p5.js:75680:9)
at helpForMisusedAtTopLevelCode (p5.js:75713:9)
get pixels @ p5.js:68523
(anonymous) @ p5.js:75668
getSymbols @ p5.js:75665
defineMisusedAtTopLevelCode @ p5.js:75680
helpForMisusedAtTopLevelCode @ p5.js:75713
This error happens here in p5.js because context is the window and p5 overrides window.constructor p5's class constructor, which is why it's enumerated by Object.keys when it wouldn't otherwise.
fxns has a constructor property too because all JS Objects do, but ofc it doesn't store a string. Hence since func is not a string it lacks string methods.
for(constpropofObject.keys(context)){constlowercase=prop.toLowerCase();// check if the lowercase property name has an entry in fxns, if the// actual name with correct capitalization doesnt exist in context,// and if the user-defined symbol is of the type functionif(fxns[lowercase]&&!context[fxns[lowercase]]&&typeofcontext[prop]==='function'){constmsg=translator('fes.checkUserDefinedFns',{name: prop,actualName: fxns[lowercase]});p5._friendlyError(msg,fxns[lowercase]);}}
The text was updated successfully, but these errors were encountered:
Hi, I am wondering if anyone is working on this issue, and if i could be assigned to it.
Fair warning this is my first contribution. I would like to contribute as part of an assignment for coursework, but could not find any good first issues that were not either, trivial frontend code or already assigned.
Most appropriate sub-area of p5.js?
p5.js version
v2 beta 5
Web browser and version
134.0.6998.166 (Official Build) (arm64)
Operating system
macOS Version 15.3.2 (Build 24D81)
Steps to reproduce this
To reproduce run
new p5()
.Error log:
This error happens here in p5.js because
context
is thewindow
and p5 overrideswindow.constructor
p5's class constructor, which is why it's enumerated byObject.keys
when it wouldn't otherwise.fxns
has aconstructor
property too because all JS Objects do, but ofc it doesn't store a string. Hence sincefunc
is not a string it lacks string methods.The text was updated successfully, but these errors were encountered: