Access Webamp from window

This commit is contained in:
Jordan Eldredge 2023-01-23 22:42:40 -08:00
parent 4220148fdc
commit cea359a39b
2 changed files with 4 additions and 2 deletions

View file

@ -32,7 +32,7 @@
},
"scripts": {
"start": "react-scripts start",
"build-webamp": "cd ../webamp && yarn build-library",
"build-webamp": "cd ../webamp && yarn prepublishOnly",
"build": "yarn build-webamp && react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject",

View file

@ -15,7 +15,9 @@ class WebampComponent extends React.Component {
}
async _loadWebamp() {
const Webamp = (await import("webamp")).default;
// TODO: Fix export
await import("webamp");
const Webamp = window.Webamp;
if (this._disposable.disposed) {
return;
}