Skip to content

Commit

Permalink
fix(IE8): fix for IE8 error on using isUndefined function
Browse files Browse the repository at this point in the history
Using isUndefined on console object in IE8 will throw an error.
This reverts to using `typeof console === 'undefined'.

Closes #280
  • Loading branch information
tivie committed Jan 6, 2017
1 parent b1c458a commit 561dc5f
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
3 changes: 2 additions & 1 deletion dist/showdown.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/showdown.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/showdown.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/showdown.min.js.map

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion src/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit 561dc5f

Please sign in to comment.