viewer: fix router pop on close

pull/175/head
Varun Patil 2022-11-07 05:24:17 -08:00
parent d171602e8e
commit a0b2bb3206
1 changed files with 4 additions and 0 deletions

View File

@ -600,6 +600,10 @@ export default class Viewer extends Mixins(GlobalMixin) {
/** Set the route hash to the given photo */
private setRouteHash(photo: IPhoto | undefined) {
if (!photo && !this.isOpen) {
return this.$router.back();
}
const hash = photo ? utils.getViewerHash(photo) : "";
if (hash !== this.$route.hash) {
this.$router.replace({