Commit b6d06454 authored by Michael Droettboom's avatar Michael Droettboom

Fix package loading race condition

parent 82d0c4cb
......@@ -148,8 +148,11 @@ var languagePluginLoader = new Promise((resolve, reject) => {
messageCallback(`Loading ${packageList}`);
}
var packageCounter = Object.keys(toLoad).length * 2;
window.pyodide._module.monitorRunDependencies = (n) => {
if (n === 0) {
packageCounter--;
if (packageCounter === 0) {
for (let package in toLoad) {
window.pyodide.loadedPackages[package] = toLoad[package];
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment