Skip to content

Commit a0c642c

Browse files
authored
recursive = bad
1 parent 0a24768 commit a0c642c

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/extensions/jwPointer/index.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,14 @@ class PointerType {
8888
pointer.style.opacity = "0.5";
8989
root.appendChild(pointer);
9090
if (!destroyed) {
91-
let value = (this.value !== null && this.value.toReporterContent) ? this.value.toReporterContent() : span(this.value);
92-
if (this.value === null) value = span("null");
91+
let value
92+
try {
93+
if (this.value === null) value = span("null")
94+
else if (this.value instanceof Pointer) value = span("(Pointer)")
95+
else this.value.toReporterContent ? this.value.toReporterContent() : span(this.value)
96+
} catch (e) {
97+
value = span("(Recursive)")
98+
}
9399
value.style.maxWidth = "100%";
94100
value.style.overflow = "auto";
95101
root.appendChild(value);

0 commit comments

Comments
 (0)