Skip to content

Commit bf901b8

Browse files
bug #48993 [VarDumper] Fix JS to expand / collapse (nicolas-grekas)
This PR was merged into the 5.4 branch. Discussion ---------- [VarDumper] Fix JS to expand / collapse | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #48545 | License | MIT | Doc PR | - As hinted in facebook/react#25897 (comment) Commits ------- 19add97 [VarDumper] Fix JS to expand / collapse
2 parents 4ae23e6 + 19add97 commit bf901b8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Component/VarDumper/Dumper/HtmlDumper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,9 @@ protected function getDumpHeader()
167167
};
168168
169169
refStyle.innerHTML = 'pre.sf-dump .sf-dump-compact, .sf-dump-str-collapse .sf-dump-str-collapse, .sf-dump-str-expand .sf-dump-str-expand { display: none; }';
170-
(doc.documentElement.firstElementChild || doc.documentElement.children[0]).appendChild(refStyle);
170+
doc.head.appendChild(refStyle);
171171
refStyle = doc.createElement('style');
172-
(doc.documentElement.firstElementChild || doc.documentElement.children[0]).appendChild(refStyle);
172+
doc.head.appendChild(refStyle);
173173
174174
if (!doc.addEventListener) {
175175
addEventListener = function (element, eventName, callback) {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy