| @@ -42,17 +42,15 @@ | ||
| 42 | 42 | } |
| 43 | 43 | if(!window.bf_globals[contentId]){ |
| 44 | 44 | window.bf_globals[contentId] = {inits: {}, contentId: contentId}; |
| 45 | 45 | }else{ |
| 46 | - window.bf_globals[contentId].inits = {}; | |
| 46 | + if(!window.bf_globals[contentId].inits) window.bf_globals[contentId].inits = {}; | |
| 47 | 47 | window.bf_globals[contentId].contentId = contentId; |
| 48 | 48 | } |
| 49 | 49 | }); |
| 50 | 50 | }; |
| 51 | - // Wait for DOM ready: optimizers can run this before the form markup is | |
| 52 | - // parsed, and the not-found branch would then delete arrived config. | |
| 53 | 51 | if(document.readyState === "loading"){ |
| 54 | - document.addEventListener("DOMContentLoaded", bfSetupGlobals); | |
| 52 | + document.addEventListener("DOMContentLoaded", bfSetupGlobals, { once: true }); | |
| 55 | 53 | } else { |
| 56 | 54 | bfSetupGlobals(); |
| 57 | 55 | } |
| 58 | 56 | })();'; |