Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit bf901b8

Browse filesBrowse 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
Copy full SHA for bf901b8

File tree

1 file changed

+2
-2
lines changed
Filter options

1 file changed

+2
-2
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/VarDumper/Dumper/HtmlDumper.php
+2-2Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.