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:
parent
9aa0945f03
commit
c220f41701
1 changed files with 3 additions and 5 deletions
|
@ -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);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue