0
0
Fork 0
mirror of https://github.com/liabru/matter-js.git synced 2024-11-23 09:26:51 -05:00

changed Common.log to use console.warn

This commit is contained in:
liabru 2015-01-21 00:09:07 +00:00
parent 9aa0945f03
commit c220f41701

View file

@ -253,7 +253,7 @@ var Common = {};
* @param {string} type * @param {string} type
*/ */
Common.log = function(message, type) { Common.log = function(message, type) {
if (!console || !console.log) if (!console || !console.log || !console.warn)
return; return;
var style; var style;
@ -261,15 +261,13 @@ var Common = {};
switch (type) { switch (type) {
case 'warn': case 'warn':
style = 'color: coral'; console.warn('Matter.js:', message);
break; break;
case 'error': case 'error':
style = 'color: red'; console.log('Matter.js:', message);
break; break;
} }
console.log('%c [Matter] ' + type + ': ' + message, style);
}; };
/** /**