Skip to content

Commit e2c36c5

Browse files
committed
merged branch craue/patch-22 (PR #4395)
Commits ------- d11af63 avoid showing the web profiler toolbar loading error if status is 0 Discussion ---------- [WebProfilerBundle] avoid showing the web profiler toolbar loading error if status is 0 Currently, such error is also shown if loading the page is manually aborted, e.g. by clicking on a link before the toolbar has been loaded, which is quite annoying. --------------------------------------------------------------------------- by travisbot at 2012-05-24T14:42:43Z This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1422610) (merged d11af63 into b07fb3c).
2 parents b07fb3c + d11af63 commit e2c36c5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_js.html.twig

+3-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
el.style.display = -1 !== xhr.responseText.indexOf('sf-toolbarreset') ? 'block' : 'none';
1010
},
1111
function(xhr) {
12-
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 }) }}')
12+
if (xhr.status !== 0) {
13+
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 }) }}');
14+
}
1315
}
1416
);
1517
})();

0 commit comments

Comments
 (0)