Bläddra i källkod

Revert #208 Do not work on IE11

Amauri CHAMPEAUX 6 år sedan
förälder
incheckning
7bccde22c6
1 ändrade filer med 3 tillägg och 2 borttagningar
  1. 3 2
      tarteaucitron.js

+ 3 - 2
tarteaucitron.js

@@ -880,8 +880,9 @@ var tarteaucitron = {
 
             if (typeof Array.prototype.map === 'function') {
 
-              var mainChildren = Array.from(main.children);
-              mainChildren.sort(function (a, b) {
+              Array.prototype.map.call(main.children, Object).sort(function (a, b) {
+              //var mainChildren = Array.from(main.children);
+              //mainChildren.sort(function (a, b) {
 
                     if (tarteaucitron.services[a.id.replace(/Line/g, '')].name > tarteaucitron.services[b.id.replace(/Line/g, '')].name) { return 1; }
                     if (tarteaucitron.services[a.id.replace(/Line/g, '')].name < tarteaucitron.services[b.id.replace(/Line/g, '')].name) { return -1; }