processing / p5.js-editor

Deprecated desktop editor for p5.js
https://p5js.org
MIT License
338 stars 91 forks source link

Small change to ensure styling is only applied to logs with strings #245

Closed mattdesl closed 8 years ago

mattdesl commented 8 years ago

After my last PR, https://github.com/processing/p5.js-editor/pull/244, there is a slight bug when you do something like this (passing numbers or non-strings) –

console.log(mouseX, mouseY);

This PR should fix that to ensure that styling is only applied when the first two arguments are strings, like this:

console.log('%cMouse:', 'background: red', mouseX, mouseY);