diff --git a/app/pages/package-code/[[org]]/[packageName]/v/[version]/[...filePath].vue b/app/pages/package-code/[[org]]/[packageName]/v/[version]/[...filePath].vue index bbbd474248..c7d74034aa 100644 --- a/app/pages/package-code/[[org]]/[packageName]/v/[version]/[...filePath].vue +++ b/app/pages/package-code/[[org]]/[packageName]/v/[version]/[...filePath].vue @@ -176,7 +176,11 @@ const { data: fileContent, status: fileStatus, execute: fetchFileContent, -} = useFetch(() => fileContentUrl.value!, { immediate: false }) + clear: clearFileContent, +} = useFetch(() => fileContentUrl.value!, { + immediate: false, + watch: false, +}) // Loading skeleton state const isLoading = computed(() => { @@ -196,6 +200,7 @@ function toggleMobileTreeDrawer(): void { watch( fileContentUrl, url => { + clearFileContent() if (url) fetchFileContent() }, { immediate: true },