Skip to content

Commit 90072c8

Browse files
authored
fix(playground): avoid stringifying invalid console messages (#11150)
1 parent 95ea0da commit 90072c8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: client/src/playground/index.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -138,13 +138,15 @@ export default function Playground() {
138138
) {
139139
setVConsole((vConsole) => [...vConsole, { prop, message }]);
140140
} else {
141+
const warning = "[Playground] Unsupported console message";
141142
setVConsole((vConsole) => [
142143
...vConsole,
143144
{
144145
prop: "warn",
145-
message: `[Playground] Unsupported console message: ${JSON.stringify({ prop, message }, null, 2)}`,
146+
message: `${warning} (see browser console)`,
146147
},
147148
]);
149+
console.warn(warning, { prop, message });
148150
}
149151
} else if (typ === "ready") {
150152
updatePlayIframe(iframe.current, getEditorContent());

0 commit comments

Comments
 (0)