Skip to content

Commit ca665d2

Browse files
committed
javascript addIconsMisc bug
1 parent 538d5ff commit ca665d2

3 files changed

Lines changed: 19 additions & 29 deletions

File tree

src/Debug/js/Debug.js

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -989,22 +989,17 @@ var phpDebugConsole = (function (exports, $) {
989989
}
990990

991991
function addIconsMisc ($node) {
992-
var $icon;
993-
var $node2;
994992
var selector;
995993
for (selector in config$7.iconsMisc) {
996-
$node2 = $node.find(selector);
997-
if ($node2.length === 0) {
998-
continue
999-
}
1000-
$icon = $(config$7.iconsMisc[selector]);
1001-
if ($node2.find('> i:first-child').hasClass($icon.attr('class'))) {
1002-
// already have icon
1003-
$icon = null;
1004-
continue
1005-
}
1006-
$node2.prepend($icon);
1007-
$icon = null;
994+
$node.find(selector).each(function () {
995+
var $this = $(this);
996+
var $icon = $(config$7.iconsMisc[selector]);
997+
if ($this.find('> i:first-child').hasClass($icon.attr('class'))) {
998+
// already have icon
999+
return
1000+
}
1001+
$this.prepend($icon);
1002+
});
10081003
}
10091004
}
10101005

src/Debug/js/Debug.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Debug/js_src/enhanceEntries.js

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -99,22 +99,17 @@ function addIcons ($node) {
9999
}
100100

101101
function addIconsMisc ($node) {
102-
var $icon
103-
var $node2
104102
var selector
105103
for (selector in config.iconsMisc) {
106-
$node2 = $node.find(selector)
107-
if ($node2.length === 0) {
108-
continue
109-
}
110-
$icon = $(config.iconsMisc[selector])
111-
if ($node2.find('> i:first-child').hasClass($icon.attr('class'))) {
112-
// already have icon
113-
$icon = null
114-
continue
115-
}
116-
$node2.prepend($icon)
117-
$icon = null
104+
$node.find(selector).each(function () {
105+
var $this = $(this)
106+
var $icon = $(config.iconsMisc[selector])
107+
if ($this.find('> i:first-child').hasClass($icon.attr('class'))) {
108+
// already have icon
109+
return
110+
}
111+
$this.prepend($icon)
112+
});
118113
}
119114
}
120115

0 commit comments

Comments
 (0)