Explorar o código

Prevent undefined error

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

+ 5 - 0
tarteaucitron.js

@@ -92,6 +92,11 @@ var tarteaucitron = {
                     }
                     return out;
                 }
+                
+                if (tarteaucitron.job === undefined) {
+                    return;
+                }
+                
                 tarteaucitron.job = cleanArray(tarteaucitron.job);
                 tarteaucitron.job = tarteaucitron.job.sort(function (a, b) {
                     if (s[a].type + s[a].key > s[b].type + s[b].key) { return 1; }