fix(IE8): fix for IE8 error on using isUndefined function

Using isUndefined on console object in IE8 will throw an error.
This reverts to using `typeof console === 'undefined'.

Closes #280
This commit is contained in:
Estevao Soares dos Santos 2017-01-06 04:00:30 +00:00
parent b1c458a762
commit 561dc5f155
5 changed files with 2 additions and 1 deletions

BIN
dist/showdown.js vendored

Binary file not shown.

BIN
dist/showdown.js.map vendored

Binary file not shown.

BIN
dist/showdown.min.js vendored

Binary file not shown.

Binary file not shown.

View File

@ -254,7 +254,8 @@ showdown.helper.replaceRecursiveRegExp = function (str, replacement, left, right
/**
* POLYFILLS
*/
if (showdown.helper.isUndefined(console)) {
// use this instead of builtin is undefined for IE8 compatibility
if (typeof(console) === 'undefined') {
console = {
warn: function (msg) {
'use strict';