From 5ef84960396d106f090663b7ddce5d3bef3f5fd5 Mon Sep 17 00:00:00 2001
From: Terry Truong <terry06890@gmail.com>
Date: Mon, 11 Jul 2022 15:22:01 +1000
Subject: Fix re-init with url-links-to-node bug

---
 src/App.vue | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'src/App.vue')

diff --git a/src/App.vue b/src/App.vue
index ecf2948..7fd7576 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -942,7 +942,7 @@ export default defineComponent({
 			let nodeName = (new URL(window.location.href)).searchParams.get('node');
 			// Query server
 			let urlParams = new URLSearchParams({type: 'node', tree: this.uiOpts.tree});
-			if (nodeName != null){
+			if (nodeName != null && firstInit){
 				urlParams.append('name', nodeName);
 				urlParams.append('toroot', '1');
 			}
@@ -1103,7 +1103,7 @@ export default defineComponent({
 			}
 		},
 	},
-	created(){
+	mounted(){
 		window.addEventListener('resize', this.onResize);
 		window.addEventListener('keydown', this.onKeyUp);
 		this.initTreeFromServer();
-- 
cgit v1.2.3

