Wrapping exception js in Sfjs check and also loading base_js Sfjs if needed

This commit is contained in:
Ryan Weaver 2021-05-20 15:05:26 -04:00 committed by Nicolas Grekas
parent c995f1c814
commit 5fa42f11f3
2 changed files with 253 additions and 252 deletions

View File

@ -5,7 +5,7 @@
them as JavaScript source code. Always use '/*' comments instead
of '//' comments to avoid impossible-to-debug side-effects #}
if (typeof Sfjs === 'undefined') {
if (typeof Sfjs === 'undefined' || typeof Sfjs.loadToolbar === 'undefined') {
Sfjs = (function() {
"use strict";

View File

@ -1,7 +1,8 @@
/* This file is based on WebProfilerBundle/Resources/views/Profiler/base_js.html.twig.
If you make any change in this file, verify the same change is needed in the other file. */
/*<![CDATA[*/
Sfjs = (function() {
if (typeof Sfjs === 'undefined') {
Sfjs = (function() {
"use strict";
if ('classList' in document.documentElement) {
@ -268,12 +269,12 @@ Sfjs = (function() {
});
}
};
})();
})();
Sfjs.addEventListener(document, 'DOMContentLoaded', function() {
Sfjs.addEventListener(document, 'DOMContentLoaded', function() {
Sfjs.createTabs();
Sfjs.createToggles();
Sfjs.createFilters();
});
});
}
/*]]>*/