fix Uncaught TypeError: Cannot set property 'push' of undefined if tarteaucitron.job is undefined

This commit is contained in:
Ozee31 2018-06-15 15:31:42 +02:00
parent c2e71961b0
commit 43438682c7
1 changed files with 6 additions and 3 deletions

View File

@ -333,9 +333,12 @@ var tarteaucitron = {
for (index = 0; index < tarteaucitron.job.length; index += 1) { for (index = 0; index < tarteaucitron.job.length; index += 1) {
tarteaucitron.addService(tarteaucitron.job[index]); tarteaucitron.addService(tarteaucitron.job[index]);
} }
} else {
tarteaucitron.job = []
} }
tarteaucitron.isAjax = true; tarteaucitron.isAjax = true;
tarteaucitron.job.push = function (id) { tarteaucitron.job.push = function (id) {
// ie <9 hack // ie <9 hack