Skip to content

Commit

Permalink
Simplify getInputElement in PyodideRunner
Browse files Browse the repository at this point in the history
  • Loading branch information
tuzz committed Feb 12, 2024
1 parent a47452f commit 2d6931a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/components/Editor/Runners/PyodideRunner/PyodideRunner.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

0 comments on commit 2d6931a

Please sign in to comment.