avoid showing the web profiler toolbar loading error if status is 0

This commit is contained in:
Christian Raue 2012-05-24 16:06:17 +02:00
parent b07fb3c459
commit d11af63672

View File

@ -9,7 +9,9 @@
el.style.display = -1 !== xhr.responseText.indexOf('sf-toolbarreset') ? 'block' : 'none';
},
function(xhr) {
confirm('An error occurred while loading the web debug toolbar (' + xhr.status + ': ' + xhr.statusText + ').\n\nDo you want to open the profiler?') && (window.location = '{{ path("_profiler", { "token": token }) }}')
if (xhr.status !== 0) {
confirm('An error occurred while loading the web debug toolbar (' + xhr.status + ': ' + xhr.statusText + ').\n\nDo you want to open the profiler?') && (window.location = '{{ path("_profiler", { "token": token }) }}');
}
}
);
})();