瀏覽代碼

Fix a bug with Prototype Enumerable

Amauri CHAMPEAUX 6 年之前
父節點
當前提交
10b8db89bb
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      tarteaucitron.js

+ 1 - 1
tarteaucitron.js

@@ -900,7 +900,7 @@ var tarteaucitron = {
 
 
             allDivs = main.childNodes;
             allDivs = main.childNodes;
 
 
-            if (typeof Array.prototype.map === 'function') {
+            if (typeof Array.prototype.map === 'function' && typeof Enumerable.each !== 'function') {
                 Array.prototype.map.call(main.children, Object).sort(function (a, b) {
                 Array.prototype.map.call(main.children, Object).sort(function (a, b) {
                 //var mainChildren = Array.from(main.children);
                 //var mainChildren = Array.from(main.children);
                 //mainChildren.sort(function (a, b) {
                 //mainChildren.sort(function (a, b) {