manager: safe widget removal (check for props before looking into stores)
This commit is contained in:
parent
ea1abb9634
commit
f49bd6377e
1 changed files with 4 additions and 4 deletions
|
|
@ -91,10 +91,10 @@ WidgetManager.prototype.removeWidget = function(hash) {
|
|||
linkId = widget.widgetData.linkId,
|
||||
id = widget.widgetData.id
|
||||
|
||||
delete this.widgets[hash]
|
||||
delete this.idRoute[id][h2]
|
||||
delete this.linkIdRoute[linkId][h2]
|
||||
delete this.addressRoute[address][h2]
|
||||
if (this.widgets[hash]) delete this.widgets[hash]
|
||||
if (id && this.idRoute[id][h2]) delete this.idRoute[id][h2]
|
||||
if (linkId && this.linkIdRoute[linkId][h2]) delete this.linkIdRoute[linkId][h2]
|
||||
if (address && this.addressRoute[address][h2]) delete this.addressRoute[address][h2]
|
||||
}
|
||||
|
||||
WidgetManager.prototype.getWidgetBy = function(key, dict) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue