From 251614c507cfe39a8fbaf29b70056d62612b694f Mon Sep 17 00:00:00 2001 From: AVMG20 Date: Fri, 12 Nov 2021 23:16:59 +0100 Subject: [PATCH] hotfix, create page node not properly updating with multiple locations --- resources/views/servers/create.blade.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/resources/views/servers/create.blade.php b/resources/views/servers/create.blade.php index 1ec98b90..d36e297a 100644 --- a/resources/views/servers/create.blade.php +++ b/resources/views/servers/create.blade.php @@ -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) ?? {}