Skip to content

Commit

Permalink
Allow re-click of display with force reloading if already on the route.
Browse files Browse the repository at this point in the history
This forces redisplay.
  • Loading branch information
dannon committed Nov 6, 2023
1 parent 83dfdcb commit 4bb9c44
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion client/src/components/History/Content/ContentItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,13 @@ export default {
const url = entryPointsForHda[0].target;
window.open(url, "_blank");
} else {
this.$router.push(this.itemUrls.display, { title: this.name });
// vue-router 4 supports a force push, but we work around it here until then.
// upon update, we can use `force` and avoid the full reload.
if (this.$router.currentRoute.path === this.itemUrls.display) {
this.$router.go();
} else {
this.$router.push(this.itemUrls.display, { title: this.name });
}
}
},
onDelete(recursive = false) {
Expand Down

0 comments on commit 4bb9c44

Please sign in to comment.