mirror of
https://github.com/opnsense/core.git
synced 2026-05-28 04:34:51 -04:00
widgets: fix Traffic.js initialization race condition (#10099)
This commit is contained in:
parent
477451d9b7
commit
8b5a768ec7
1 changed files with 3 additions and 3 deletions
|
|
@ -32,7 +32,7 @@ export default class Traffic extends BaseWidget {
|
|||
trafficIn: null,
|
||||
trafficOut: null
|
||||
};
|
||||
this.initialized = false;
|
||||
this.initialized = null;
|
||||
this.datasets = {inbytes: [], outbytes: []};
|
||||
this.configurable = true;
|
||||
this.configChanged = false;
|
||||
|
|
@ -160,9 +160,9 @@ export default class Traffic extends BaseWidget {
|
|||
const data = JSON.parse(event.data);
|
||||
|
||||
if (!this.initialized) {
|
||||
await this._initialize(data);
|
||||
this.initialized = true;
|
||||
this.initialized = this._initialize(data);
|
||||
}
|
||||
await this.initialized;
|
||||
|
||||
let config = null;
|
||||
if (this.configChanged) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue