[next] Fix #1730 - Make worker an empty attribute only (#1732)

This commit is contained in:
Andrea Giammarchi
2023-09-20 16:44:00 +02:00
committed by GitHub
parent 23e1ab81b3
commit 8f3c36deea
6 changed files with 31 additions and 43 deletions

View File

@@ -1,9 +1,9 @@
// PyScript Error Plugin
import { hooks } from "../core.js";
hooks.onBeforeRun.add(function override(pyScript) {
hooks.onInterpreterReady.add(function override(pyScript) {
// be sure this override happens only once
hooks.onBeforeRun.delete(override);
hooks.onInterpreterReady.delete(override);
// trap generic `stderr` to propagate to it regardless
const { stderr } = pyScript.io;