Skip to content

Commit 5b1b7b1

Browse files
committed
Don't render both runners
It seems we were always rendering both runners since pyodide was introduced. This was causing test failures in my previous commit as there were duplicate elemeents. We could later clean up the use of `active` within the components as that may no longer be needed.
1 parent 07bfdc5 commit 5b1b7b1

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

src/components/Editor/Runners/PythonRunner/PythonRunner.jsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,14 @@ const PythonRunner = ({ outputPanels = ["text", "visual"] }) => {
7171
}, [project, codeRunTriggered, senseHatAlwaysEnabled, skulptFallback, t]);
7272
return (
7373
<>
74-
<PyodideRunner
75-
active={activeRunner === "pyodide"}
74+
{activeRunner === "pyodide" && <PyodideRunner
75+
active={true}
7676
outputPanels={outputPanels}
77-
/>
78-
<SkulptRunner
79-
active={activeRunner === "skulpt"}
77+
/>}
78+
{activeRunner === "skulpt" && <SkulptRunner
79+
active={true}
8080
outputPanels={outputPanels}
81-
/>
81+
/>}
8282
</>
8383
);
8484
};

0 commit comments

Comments
 (0)