Merge pull request #287 from ControlPanel-gg/development

hotfix, create page node not properly updating with multiple locations
This commit is contained in:
AVMG 2021-11-13 00:17:19 +01:00 committed by GitHub
commit 47037dcf51
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -411,8 +411,11 @@
this.selectedNestObject = this.nests.find(nest => nest.id == this.selectedNest) ?? {}
this.selectedEggObject = this.eggs.find(egg => egg.id == this.selectedEgg) ?? {}
this.selectedNodeObject = {};
this.locations.forEach(location => {
this.selectedNodeObject = location.nodes.find(node => node.id == this.selectedNode) ?? {};
if (!this.selectedNodeObject?.id) {
this.selectedNodeObject = location.nodes.find(node => node.id == this.selectedNode) ?? {};
}
})
this.selectedProductObject = this.products.find(product => product.id == this.selectedProduct) ?? {}