From 1f7c684969eae0bb89544cdd8a2ba1b1079c90e2 Mon Sep 17 00:00:00 2001 From: Michael Sharpe Date: Thu, 24 Feb 2022 14:50:31 -0800 Subject: [PATCH] Fix issue when trying to playtest print an object --- client/src/features/Thoth/windows/PlaytestWindow.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/src/features/Thoth/windows/PlaytestWindow.jsx b/client/src/features/Thoth/windows/PlaytestWindow.jsx index 92102313d..32d87cac2 100644 --- a/client/src/features/Thoth/windows/PlaytestWindow.jsx +++ b/client/src/features/Thoth/windows/PlaytestWindow.jsx @@ -42,7 +42,8 @@ const Playtest = ({ tab }) => { const { $PLAYTEST_INPUT, $PLAYTEST_PRINT } = events const printToConsole = useCallback( - (_, text) => { + (_, _text) => { + let text = typeof _text === 'object' ? JSON.stringify(_text) : _text const newHistory = [...history, text] setHistory(newHistory) },