From 25cdfa26854bbf56aeace2cb9a882c44a9a4635f Mon Sep 17 00:00:00 2001 From: tiny-craft <137850705+tiny-craft@users.noreply.github.com> Date: Thu, 19 Oct 2023 12:00:10 +0800 Subject: [PATCH] fix: error causes when close database --- frontend/src/components/sidebar/BrowserTree.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/sidebar/BrowserTree.vue b/frontend/src/components/sidebar/BrowserTree.vue index 426b199..f0d406c 100644 --- a/frontend/src/components/sidebar/BrowserTree.vue +++ b/frontend/src/components/sidebar/BrowserTree.vue @@ -223,9 +223,9 @@ const handleSelectContextMenu = (key) => { return } const node = connectionStore.getNode(selectedKey) - const { db, key: nodeKey } = node || {} - const redisKey = node.redisKeyCode || node.redisKey - const redisKeyName = !!node.redisKeyCode ? node.label : redisKey + const { db = 0, key: nodeKey, redisKey: rk = '', redisKeyCode: rkc, label } = node || {} + const redisKey = rkc || rk + const redisKeyName = !!rkc ? label : redisKey switch (key) { case 'server_info': tabStore.setSelectedKeys(props.server)