Эх сурвалжийг харах

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
Estevao Soares dos Santos 8 жил өмнө
parent
commit
561dc5f155

+ 2 - 1
dist/showdown.js

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

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
dist/showdown.js.map


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
dist/showdown.min.js


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
dist/showdown.min.js.map


+ 2 - 1
src/helpers.js

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

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно