0
0
Fork 0
mirror of https://github.com/liabru/matter-js.git synced 2024-12-25 13:39:06 -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
*/
Common.log = function(message, type) {
if (!console || !console.log)
if (!console || !console.log || !console.warn)
return;
var style;
@ -261,15 +261,13 @@ var Common = {};
switch (type) {
case 'warn':
style = 'color: coral';
console.warn('Matter.js:', message);
break;
case 'error':
style = 'color: red';
console.log('Matter.js:', message);
break;
}
console.log('%c [Matter] ' + type + ': ' + message, style);
};
/**