This repository was archived by the owner on Nov 14, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -251,7 +251,7 @@ public function includeInHTML($html)
251251 }
252252
253253 // add scripts
254- if (strpos ($ html , self ::LOADER_SCRIPT_PLACEHOLDER )) {
254+ if (strpos ($ html , self ::LOADER_SCRIPT_PLACEHOLDER ) !== false ) {
255255 // Attempt to replace the placeholder comment with our scripts
256256 $ script_requirements .= "<!-- :) --> " ;
257257 $ html = str_replace (self ::LOADER_SCRIPT_PLACEHOLDER , $ script_requirements , $ html );
@@ -278,7 +278,9 @@ public function includeInHTML($html)
278278
279279 $ end = microtime (true );
280280 $ time = round ($ end - $ start , 7 );
281- $ html .= "<!-- {$ time } --> \n" ;
281+ if ($ add_async_timing = Config::inst ()->get ( Requirements::class, 'add_async_timing ' )) {
282+ $ html .= "<!-- {$ time } --> \n" ;
283+ }
282284
283285 return $ html ;
284286 }
@@ -396,7 +398,9 @@ private function includeInHTMLViaDOMDocument($html) {
396398 $ html = $ dom ->saveHTML ();
397399 libxml_clear_errors ();
398400
399- $ html .= "<!-- {$ time } --> \n" ;
401+ if ($ add_async_timing = Config::inst ()->get ( Requirements::class, 'add_async_timing ' )) {
402+ $ html .= "<!-- {$ time } --> \n" ;
403+ }
400404
401405 return $ html ;
402406 }
You can’t perform that action at this time.
0 commit comments