Skip to content

Commit 9e8236e

Browse files
author
almchung
committed
small fixes
1 parent 148571b commit 9e8236e

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/core/error_helpers.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ function report(message, func, color) {
5656
} else if (getType(color) === 'number') { // Type to color
5757
color = typeColors[color];
5858
}
59-
// LM TEMP commenting this out until we get the whole system working
6059
if (func.substring(0,4) === 'load'){
6160
console.log(
6261
'%c> p5.js says: '+message+'%c'+
@@ -126,7 +125,7 @@ p5._friendlyFileLoadError = function (errorType, filePath) {
126125
* "ellipse was expecting a number for parameter #1,
127126
* received "foo" instead."
128127
*/
129-
function validateParameters(func, args) {
128+
p5._validateParameters = function validateParameters(func, args) {
130129
if (p5.disableFriendlyErrors ||
131130
typeof(IS_MINIFIED) !== 'undefined') {
132131
return; // skip FES
@@ -156,7 +155,7 @@ function validateParameters(func, args) {
156155
p5._friendlyParamError(errorArray[m], func);
157156
}
158157
}
159-
}
158+
};
160159
// validateParameters() helper functions:
161160
// lookupParamDoc() for querying data.json
162161
function lookupParamDoc(func){
@@ -406,8 +405,7 @@ function helpForMisusedAtTopLevelCode(e, log) {
406405

407406
// Exposing this primarily for unit testing.
408407
p5.prototype._helpForMisusedAtTopLevelCode = helpForMisusedAtTopLevelCode;
409-
p5.prototype._validateParameters = validateParameters;
410-
p5._validateParameters = validateParameters;
408+
p5.prototype._validateParameters = p5.validateParameters;
411409

412410
if (document.readyState !== 'complete') {
413411
window.addEventListener('error', helpForMisusedAtTopLevelCode, false);

0 commit comments

Comments
 (0)