fix: error causes when close database

This commit is contained in:
tiny-craft 2023-10-19 12:00:10 +08:00
parent 22d3954e6f
commit 25cdfa2685
1 changed files with 3 additions and 3 deletions

View File

@ -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)