Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I was seeing something strange where using p5.js worked fine, and p5.min.js also worked but threw an error, "p5 is not defined". I traced it to the
p5.prototype._validateParameters
function being declared twice, the second time to disable it. But in the minified file, it was declared only once, but it seemed to be outside of the scope of where "p5" is defined.I searched https://raw.githubusercontent.com/lmccart/p5.js-release/master/lib/p5.min.js for "p5.prototype._validateParameters" and thought it was weird how the function is a noop, whereas in p5.js it is defined once, then overridden, but even the overridden version returns true.
I ran
uglifyjs p5.js -c -m -o p5.min.js
for this PR and it resolved the error for me. Lemme know if I did anything wrong or telling me to buzz off is fine too. :D