mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-23 18:17:38 +00:00
Try to use Webamp.dispose if possible
This commit is contained in:
parent
77b492a465
commit
eb19bcdaf7
1 changed files with 8 additions and 4 deletions
|
|
@ -17,10 +17,14 @@ class WebampComponent extends React.Component {
|
|||
this._disposable.dispose();
|
||||
|
||||
if (this._webamp) {
|
||||
// TODO: Repace this with this._webamp.destroy() once we upgrade.
|
||||
const close = document.querySelector("#webamp #close");
|
||||
if (close != null) {
|
||||
close.click();
|
||||
if (this._webamp.dispose) {
|
||||
this._webamp.dispose();
|
||||
} else {
|
||||
// TODO: Remove this once we upgrade Webamp
|
||||
const close = document.querySelector("#webamp #close");
|
||||
if (close != null) {
|
||||
close.click();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue