|
@@ -1,10 +1,9 @@
|
|
|
export default {
|
|
|
template: "<div><slot></slot></div>",
|
|
|
mounted() {
|
|
|
+ const initial_path = window.location.pathname;
|
|
|
window.addEventListener("popstate", (event) => {
|
|
|
- if (event.state?.page) {
|
|
|
- this.$emit("open", event.state.page);
|
|
|
- }
|
|
|
+ this.$emit("open", event.state?.page || initial_path);
|
|
|
});
|
|
|
const connectInterval = setInterval(async () => {
|
|
|
if (window.socket.id === undefined) return;
|