Skip to content

Commit

Permalink
added conditional statement to avoid redundant push
Browse files Browse the repository at this point in the history
  • Loading branch information
dhchandw committed Sep 6, 2024
1 parent 1ccc625 commit 093beab
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/ZclEndpointCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,10 @@ export default {
},
handleEndpointCardClick(endpointReference) {
this.setSelectedEndpointType(endpointReference)
this.$router.push({ path: '/' })
// takes the user back to endpoint main page (i.e. list of clusters)
if (this.$route.path !== '/') {
this.$router.push({ path: '/' })
}
}
},
computed: {
Expand Down

0 comments on commit 093beab

Please sign in to comment.