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

Sign up
Appearance settings
This repository was archived by the owner on May 14, 2020. It is now read-only.

Commit 778907f

Browse files
janpaul123zalmoxisus
authored andcommitted
Show unknown nodes (#114)
Currently objects of unknown types are simply hidden, which can be confusing as it would show, for example, "1 key", but then not show any keys. This PR fixes that by showing a placeholder with the name of the class. E.g. "<Int8Array>".
1 parent 65b5c51 commit 778907f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

‎src/JSONNode.js‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,9 @@ const JSONNode = ({
8585
case 'Custom':
8686
return <JSONValueNode {...simpleNodeProps} />;
8787
default:
88-
return null;
88+
return (
89+
<JSONValueNode {...simpleNodeProps} valueGetter={raw => `<${nodeType}>`} />
90+
);
8991
}
9092
};
9193

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /