widgets: fix widget register update from address 'auto' to something elese

This commit is contained in:
bordun 2020-06-12 15:20:23 +02:00
parent 3b0373f69d
commit 60ec29ecd7
2 changed files with 6 additions and 2 deletions

View file

@ -152,7 +152,7 @@ class WidgetManager extends EventEmitter {
newAddress = this.createAddressRef(widget),
hash = widget.hash
if (address && address !== 'auto' && this.addressRoute[address].indexOf(hash) != -1) this.addressRoute[address].splice(this.addressRoute[address].indexOf(hash), 1)
if (address && this.addressRoute[address].indexOf(hash) != -1) this.addressRoute[address].splice(this.addressRoute[address].indexOf(hash), 1)
if (!this.addressRoute[newAddress]) this.addressRoute[newAddress] = []
this.addressRoute[newAddress].push(hash)