From 2d6931a0eeee341a7c3d298ac2409e9b0f1719ed Mon Sep 17 00:00:00 2001 From: Chris Patuzzo Date: Mon, 12 Feb 2024 18:45:57 +0000 Subject: [PATCH] Simplify getInputElement in PyodideRunner --- .../Editor/Runners/PyodideRunner/PyodideRunner.jsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/components/Editor/Runners/PyodideRunner/PyodideRunner.jsx b/src/components/Editor/Runners/PyodideRunner/PyodideRunner.jsx index fa0e19ed4..6c74c1f35 100644 --- a/src/components/Editor/Runners/PyodideRunner/PyodideRunner.jsx +++ b/src/components/Editor/Runners/PyodideRunner/PyodideRunner.jsx @@ -210,11 +210,9 @@ const PyodideRunner = () => { }; const getInputElement = () => { - const pageInput = document.getElementById("input"); - const webComponentInput = document.querySelector("editor-wc") + return document.querySelector("editor-wc") ? document.querySelector("editor-wc").shadowRoot.getElementById("input") - : null; - return pageInput || webComponentInput; + : document.getElementById("input"); }; const getInputContent = async (element) => {