8000 Ensure minified pyscript is captured by query selector (#393) · pydemia/pyscript@1e8aa87 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1e8aa87

Browse files
authored
Ensure minified pyscript is captured by query selector (pyscript#393)
1 parent 8c65cad commit 1e8aa87

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pyscriptjs/src/interpreter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const loadInterpreter = async function (indexUrl:string): Promise<any> {
2222

2323
// let's get the full path of where PyScript is running from so we can load the pyscript.py
2424
// file from the same location
25-
const loadedScript: HTMLScriptElement = document.querySelector(`script[src$='pyscript.js']`);
25+
const loadedScript: HTMLScriptElement = document.querySelector(`script[src$='pyscript.js'], script[src$='pyscript.min.js']`);
2626
const scriptPath = loadedScript.src.substring(0, loadedScript.src.lastIndexOf('/'));
2727
await pyodide.runPythonAsync(await (await fetch(`${scriptPath}/pyscript.py`)).text());
2828

0 commit comments

Comments
 (0)
0