manager: fix poorly written purge method
This commit is contained in:
parent
17d8560c3b
commit
0da676f03d
1 changed files with 3 additions and 2 deletions
|
|
@ -101,9 +101,10 @@ WidgetManager.prototype.purge = function() {
|
|||
|
||||
for (route of [this.addressRoute, this.idRoute, this.linkIdRoute]) {
|
||||
for (key in route) {
|
||||
for (hash in route[key]) {
|
||||
for (i=route[key].length-1; i>=0; i--) {
|
||||
let hash = route[key][i]
|
||||
if (!this.widgets[hash]) {
|
||||
route[key].splice(route[key].indexOf(hash, 1))
|
||||
route[key].splice(i, 1)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue