Explorar o código

Fix a bug with Prototype Enumerable

Amauri CHAMPEAUX %!s(int64=6) %!d(string=hai) anos
pai
achega
10b8db89bb
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      tarteaucitron.js

+ 1 - 1
tarteaucitron.js

@@ -900,7 +900,7 @@ var tarteaucitron = {
 
             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) {
                 //var mainChildren = Array.from(main.children);
                 //mainChildren.sort(function (a, b) {