mirror of
https://github.com/rommapp/romm.git
synced 2026-02-18 23:42:07 +01:00
fix hack
This commit is contained in:
@@ -23,7 +23,7 @@ import storeNavigation from "@/stores/navigation";
|
||||
import storePlatforms from "@/stores/platforms";
|
||||
import type { Events } from "@/types/emitter";
|
||||
import type { Emitter } from "mitt";
|
||||
import { inject, onBeforeMount, onMounted, ref } from "vue";
|
||||
import { inject, onBeforeMount, ref } from "vue";
|
||||
import { isNull } from "lodash";
|
||||
import { useRoute } from "vue-router";
|
||||
import { ROUTES } from "@/plugins/router";
|
||||
@@ -55,6 +55,8 @@ const virtualCollectionTypeRef = ref(
|
||||
);
|
||||
|
||||
function fetchData() {
|
||||
document.removeEventListener("network-quiesced", fetchData);
|
||||
|
||||
if (fetchedType.value !== "platform") {
|
||||
platformsStore.fetchPlatforms();
|
||||
}
|
||||
@@ -70,7 +72,9 @@ function fetchData() {
|
||||
|
||||
navigationStore.reset();
|
||||
|
||||
document.removeEventListener("network-quiesced", fetchData);
|
||||
// Hack to prevent main page transition on first load
|
||||
const main = document.getElementById("main");
|
||||
if (main) main.classList.remove("no-transition");
|
||||
}
|
||||
|
||||
onBeforeMount(async () => {
|
||||
@@ -93,12 +97,6 @@ onBeforeMount(async () => {
|
||||
fetchedType.value = "platform";
|
||||
}
|
||||
});
|
||||
|
||||
onMounted(() => {
|
||||
// Hack to prevent main page transition on first load
|
||||
const main = document.getElementById("main");
|
||||
if (main) main.classList.remove("no-transition");
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
Reference in New Issue
Block a user