Skip to content

Commit

Permalink
fix(virtual-files): fetch data as json
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Aug 28, 2023
1 parent 44d07ff commit 131a2ee
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/devtools/client/pages/modules/virtual-files.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ watchEffect(() => {
if (!fileId.value)
return
const url = `/_vfs.json/${encodeURIComponent(fileId.value)}`
fetch(url)
fetch(url, {
headers: {
accept: 'application/json',
},
})
.then(i => i.json())
.then(i => current.value = i.current)
})
Expand Down

0 comments on commit 131a2ee

Please sign in to comment.