Skip to content
This repository was archived by the owner on Sep 21, 2021. It is now read-only.

Commit 9a214ee

Browse files
committed
use a ternary for the block icon in formatObjectInspector
1 parent 9dcb556 commit 9a214ee

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

packages/devtools-reps/src/object-inspector/tests/test-utils.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,9 @@ function formatObjectInspector(wrapper: Object) {
3535
arrowStr = " ";
3636
}
3737

38-
let icon = "";
39-
if (node.find(".node").first().hasClass("block")) {
40-
icon = "☲ ";
41-
}
38+
const icon = node.find(".node").first().hasClass("block")
39+
? "☲ "
40+
: "";
4241
return `${indentStr}${arrowStr}${icon}${getSanitizedNodeText(node)}`;
4342
})
4443
.join("\n");

0 commit comments

Comments
 (0)