Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

useSource - "toRefs() expects a reactive object but received a plain one" warning #393

Open
szwjonks opened this issue Nov 7, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@szwjonks
Copy link

szwjonks commented Nov 7, 2024

Describe the bug
Vue warns about using toRefs on object which isn't reactive. It happens for some sources, e.g.: WMS/WMTS and I think it's because props are descructured like here

Affected version(s)

11.2.0

To Reproduce
Check stakblitz with example copied from docs - https://stackblitz.com/edit/vue3-openlayers-template-du4aja?file=src%2Fcomponents%2FTheMap.vue

Expected behavior
No warnings in console, no possible troubles connected with those warnings.

Screenshots
obraz

Additional context
Warning about deleting cacheSize also is in console, but it's have separate issue

@szwjonks szwjonks added the bug Something isn't working label Nov 7, 2024
@azygis
Copy link

azygis commented Nov 7, 2024

I was just about to post about this! Thanks for taking it over!

@ahmadem
Copy link

ahmadem commented Nov 9, 2024

Hi.
I also encounter this problem when I try to use it in Quasar.

[Vue warn] Delete operation on key "cacheSize" failed: target is readonly.

@jonashae jonashae mentioned this issue Dec 12, 2024
15 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants