When I inspected the source code of i18next-1.7.2 line:1382 It seems that there is a missing null check in the code. error is null and error.status is being checked. So I added a simple null check.
Here is the change in the code:
Old code (from original i18next-1.7.2.js) :
if (error.status == 200) {
// file loaded but invalid json, stop waste time !
f.log('There is a typo in: ' + url);
} else if (error.status == 404) {
f.log('Does not exist: ' + url);
} else {
f.log(error.status + ' when loading ' + url);
}
done(error, {});
proposed code:
if (error == null){
done(error, {});
}else{
if (error.status == 200) {
// file loaded but invalid json, stop waste time !
f.log('There is a typo in: ' + url);
} else if (error.status == 404) {
f.log('Does not exist: ' + url);
} else {
f.log(error.status + ' when loading ' + url);
}
done(error, {});
}
When I changed the code like above, it didn't work. When I included jquery.js file it worked. Developer of i18next Jamuhl knows about the subject.