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

fix(Vue): nullish params in useLiveQueryImpl #466

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

sandros94
Copy link

Fixes a small oversight on useLiveQuery and useLiveIncrementalQuery when params are nullish.

Eg. if we want to go brrr and subscribe to all updates to a particular table like:

<script setup lang="ts">
const items = useLiveQuery('SELECT * FROM my_table;')
</script>

@sandros94 sandros94 changed the title fix(Vue): nullish params fix(Vue): nullish params in useLiveQueryImpl Dec 11, 2024
@yacineb
Copy link
Contributor

yacineb commented Dec 12, 2024

@samwillis this PR typically fixes #448

@sandros94
Copy link
Author

Indeed, thank you @yacineb 🙏

@sandros94
Copy link
Author

sandros94 commented Dec 12, 2024

marked as draft because I think I could improve it further

@sandros94 sandros94 marked this pull request as ready for review December 12, 2024 12:09
@sandros94
Copy link
Author

sandros94 commented Dec 12, 2024

These latest changes both makes sure that the watcher receives an array of refs as well as returning getters values if params is an array. Also reduced the amount of if checks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants