Corriger la race condition entre enable() et disable()
Si disable() est appelé pendant l'initialisation async de NetworkManager, le callback .then() pouvait créer l'indicateur sur une extension déjà nettoyée. Le guard vérifie que wifiService est encore présent avant de continuer.
This commit is contained in:
parent
175c0d4ca4
commit
aa2673b4e1
1 changed files with 1 additions and 0 deletions
|
|
@ -103,6 +103,7 @@ export default class WifiSignalPlusExtension extends Extension {
|
||||||
this.wifiService
|
this.wifiService
|
||||||
.init()
|
.init()
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
if (!this.wifiService) return;
|
||||||
this.createIndicator();
|
this.createIndicator();
|
||||||
this.refresh();
|
this.refresh();
|
||||||
this.startRefreshTimer();
|
this.startRefreshTimer();
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue