You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ofetch.native fails with: 'fetch' called on an object that does not implement interface Window.
Additional context
You can reproduce it with:
<template><div><div>{{res.fetch }}</div><hr/><div>{{res.ofetch }}
// ofetch fails with: `Uncaught (in promise) TypeError: 'fetch' called on an object that does not implement interface Window.`
</div></div></template><scriptsetup>constres=ref({fetch: null,ofetch: null})onMounted(async()=>{consturl='https://jsonplaceholder.typicode.com/todos/1'res.value.fetch=awaitfetch(url).then((r)=>r.json())res.value.ofetch=await$fetch.native(url).then((r)=>r.json())})</script>
Logs
No response
The text was updated successfully, but these errors were encountered:
Thanks a lot. I'm actually using the latest, I just found this stackblitz online and the error appeared also there, so it was easier to just fork that rather than building a new one.
Environment
Nuxt 3.6.5
Reproduction
https://stackblitz.com/edit/github-9ukebr-xnzf5u?file=pages%2Findex.vue
Describe the bug
ofetch.native fails with:
'fetch' called on an object that does not implement interface Window.
Additional context
You can reproduce it with:
Logs
No response
The text was updated successfully, but these errors were encountered: