diff --git a/src/App.vue b/src/App.vue index be95d5e..9e1a35a 100644 --- a/src/App.vue +++ b/src/App.vue @@ -29,7 +29,7 @@ import Sidebar from './components/Sidebar.vue'; import ChatBox from './components/ChatBox.vue'; import {useStore} from "@/store"; import {ActionTypes} from "@/store/action-types"; -import {parseUrl} from '@/util'; +import {clearHeadCache, parseUrl} from '@/util'; import {hideSplash, showSplash, showSplashError} from '@/util/splash'; import {MutationTypes} from "@/store/mutation-types"; import {LiveAtlasServerDefinition, LiveAtlasUIElement} from "@/index"; @@ -170,6 +170,7 @@ export default defineComponent({ return; } + clearHeadCache(); loadingAttempts.value = 0; window.history.replaceState({}, '', newServer.id); loadConfiguration(); diff --git a/src/util.ts b/src/util.ts index 90967c0..bfe8e83 100644 --- a/src/util.ts +++ b/src/util.ts @@ -126,6 +126,11 @@ const tickHeadQueue = () => { tickHeadQueue(); } +export const clearHeadCache = () => { + headCache.clear(); + headQueue.splice(0); +} + export const parseUrl = (url: URL) => { const query = new URLSearchParams(url.search), hash = url.hash.replace('#', '');