Skip to content

Commit

Permalink
fix #910 remove refresh interval when key not exists
Browse files Browse the repository at this point in the history
  • Loading branch information
qishibo committed Jul 23, 2022
1 parent 763c039 commit 0b3ea3e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/KeyDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ export default {
refreshContent() {
this.client.exists(this.redisKey).then(reply => {
if (!reply) {
// clear interval if auto refresh opened
this.$refs.keyHeader.removeInterval();
return this.$message.error(this.$t('message.key_not_exists'));
}

Expand Down
4 changes: 4 additions & 0 deletions src/components/KeyHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@ export default {
}, this.refreshInterval);
}
},
removeInterval() {
this.autoRefresh = false;
this.refreshInit();
},
dumpCommand() {
this.$emit('dumpCommand');
},
Expand Down

0 comments on commit 0b3ea3e

Please sign in to comment.