mirror of
https://github.com/showdownjs/showdown.git
synced 2024-03-22 13:30:55 +08:00
chore(helpers.js): add console polyfill so we can trigger warnings reliably
This commit is contained in:
parent
f8a81373fe
commit
678348d060
|
@ -105,3 +105,19 @@ showdown.helper.escapeCharacters = function escapeCharacters(text, charsToEscape
|
|||
|
||||
return text;
|
||||
};
|
||||
|
||||
/**
|
||||
* POLYFILLS
|
||||
*/
|
||||
if (showdown.helper.isUndefined(console)) {
|
||||
console = {
|
||||
warn: function (msg) {
|
||||
'use strict';
|
||||
alert(msg);
|
||||
},
|
||||
log: function (msg) {
|
||||
'use strict';
|
||||
alert(msg);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user