We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b052d65 commit 717784fCopy full SHA for 717784f
src/core/main.js
@@ -125,12 +125,12 @@ class p5 {
125
// If the user has created a global setup or draw function,
126
// assume "global" mode and make everything global (i.e. on the window)
127
if (!sketch) {
128
- if (window.p5 instanceof p5) {
+ if (typeof window.p5 !== 'undefined') {
129
console.warn('p5.js appears to have been imported multiple times. This could cause errors.');
130
return;
131
}
132
this._isGlobal = true;
133
- window.p5 = this;
+ window._p5Instance = this;
134
if (window.hitCriticalError) {
135
136
0 commit comments