manager/widgets: make reset() remove all widgets one by one and delete event listeners to avoid leaks
This commit is contained in:
parent
ee84f0746b
commit
fb1e5e0815
1 changed files with 4 additions and 4 deletions
|
|
@ -178,11 +178,11 @@ var WidgetManager = class WidgetManager extends EventEmitter {
|
|||
|
||||
reset() {
|
||||
|
||||
this.widgets = {}
|
||||
this.removeWidgets(Object.keys(this.widgets))
|
||||
|
||||
this.addressRoute = {}
|
||||
this.idRoute = {}
|
||||
this.linkIdRoute = {}
|
||||
this.removeEvent()
|
||||
|
||||
this.on('change', this.onChange, this)
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue