Prevent undefined error

This commit is contained in:
Amauri CHAMPEAUX 2015-03-16 16:22:55 +01:00
parent 10a74c05ef
commit 6d48a8e1fb
1 changed files with 6 additions and 1 deletions

View File

@ -630,6 +630,9 @@ var tarteaucitron = {
tarteaucitron.userInterface.jsSizing('cookie');
tarteaucitron.userInterface.css('tarteaucitron', 'display', 'none');
tarteaucitron.userInterface.css('tarteaucitronBack', 'display', 'block');
tarteaucitron.fallback(['tarteaucitronInfoBox'], function (elem) {
elem.style.display = 'none';
}, true);
} else {
div.style.display = 'none';
tarteaucitron.userInterface.css('tarteaucitron', 'display', 'none');
@ -661,7 +664,7 @@ var tarteaucitron = {
"order": function (id) {
"use strict";
var main = document.getElementById('tarteaucitronServices_' + id),
allDivs = main.childNodes,
allDivs,
store = [],
i;
@ -669,6 +672,8 @@ var tarteaucitron = {
return;
}
allDivs = main.childNodes;
if (typeof Array.prototype.map === 'function') {
Array.prototype.map.call(main.children, Object).sort(function (a, b) {
if (tarteaucitron.services[a.id.replace(/Line/g, '')].name > tarteaucitron.services[b.id.replace(/Line/g, '')].name) { return 1; }