mirror of
https://github.com/captbaritone/webamp.git
synced 2026-08-03 23:43:28 +00:00
Access Webamp from window
This commit is contained in:
parent
4220148fdc
commit
cea359a39b
2 changed files with 4 additions and 2 deletions
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue