فهرست منبع

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 سال پیش
والد
کامیت
561dc5f155
5فایلهای تغییر یافته به همراه4 افزوده شده و 2 حذف شده
  1. 2 1
      dist/showdown.js
  2. 0 0
      dist/showdown.js.map
  3. 0 0
      dist/showdown.min.js
  4. 0 0
      dist/showdown.min.js.map
  5. 2 1
      src/helpers.js

+ 2 - 1
dist/showdown.js

@@ -716,7 +716,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';

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 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
  */
-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';

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است