Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
chechenxu committed Apr 4, 2023
1 parent 51d5ff0 commit 9508c89
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/color/p5.Color.js
Original file line number Diff line number Diff line change
Expand Up @@ -989,7 +989,7 @@ p5.Color._parseInputs = function(r, g, b, a) {
// Constrain components to the range [0,1].
results = results.map(value => Math.max(Math.min(value, 1), 0));
} else {
p5._friendlyError(`${arguments}is not a valid color representation.`);
throw new Error(`${arguments}is not a valid color representation.`);
}

return results;
Expand Down

0 comments on commit 9508c89

Please sign in to comment.