Prevent undefined error

This commit is contained in:
Amauri CHAMPEAUX 2015-02-18 22:59:28 +01:00
parent 806e9d33bd
commit e9d7264829
1 changed files with 5 additions and 0 deletions

View File

@ -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; }