From 3e6c61107bac185c71e2345cda00a748b371376c Mon Sep 17 00:00:00 2001 From: CherryLiang Date: Wed, 30 Oct 2019 00:44:39 +1300 Subject: [PATCH] show play/stop button (#1804) --- packages/app-js/src/Playground.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/app-js/src/Playground.tsx b/packages/app-js/src/Playground.tsx index d525529ad2..6eafb0eaa4 100644 --- a/packages/app-js/src/Playground.tsx +++ b/packages/app-js/src/Playground.tsx @@ -180,7 +180,6 @@ function Playground ({ className, history, match: { params: { base64 } }, t }: P }; const _runJs = async (): Promise => { setIsRunning(true); - _stopJs(); _clearConsole(); injectedRef.current = { @@ -207,6 +206,8 @@ function Playground ({ className, history, match: { params: { base64 } }, t }: P // eslint-disable-next-line no-new-func new Function('injected', exec)(injectedRef.current); + + setIsRunning(false); }; const _selectExample = (value: string): void => { _stopJs();