From de55b59141a82c68b6a5b360d6f57a7e760e2fd6 Mon Sep 17 00:00:00 2001 From: Terry Truong Date: Tue, 26 Apr 2022 15:11:27 +1000 Subject: Make TolMap have Map type --- src/components/SearchModal.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/components/SearchModal.vue') diff --git a/src/components/SearchModal.vue b/src/components/SearchModal.vue index 5accd62..9c30cbc 100644 --- a/src/components/SearchModal.vue +++ b/src/components/SearchModal.vue @@ -21,14 +21,14 @@ export default defineComponent({ // Query server let url = new URL(window.location.href); url.pathname = '/tolnode/' + input.value; - fetch(url) + fetch(url.toString()) .then(response => { // Search successful. Get nodes in parent-chain, add to tolMap, then emit event. url.search = '?type=chain'; - fetch(url) + fetch(url.toString()) .then(response => response.json()) .then(obj => { - Object.getOwnPropertyNames(obj).forEach(key => {this.tolMap[key] = obj[key]}); + Object.getOwnPropertyNames(obj).forEach(key => {this.tolMap.set(key, obj[key])}); this.$emit('search-node', input.value); }) .catch(error => { -- cgit v1.2.3