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(watchThrottled): wait incorrect remaining time #2267

merged 4 commits into from Oct 25, 2022


Copy link

@sun0day sun0day commented Sep 28, 2022


watchThrottled does not trigger evenly.

watchThrottled(x, cb, {throttle: 100}), suppose that:

// first set
x.value = 1
// after 50ms
x.value = 2
0ms 50ms 100ms 150ms
before PR Y - - Y
after PR Y - Y -

Y: invoke cb
-: not invoke

Additional context

What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines.
  • Read the Pull Request Guidelines.
  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • Ideally, include relevant tests that fail without this PR but pass with it.

antfu previously approved these changes Oct 25, 2022
Copy link

antfu commented Oct 25, 2022

Can you help resolve the conflicts? Thanks

Copy link
Member Author

sun0day commented Oct 25, 2022

Can you help resolve the conflicts? Thanks

Resolved @antfu

@antfu antfu enabled auto-merge (squash) October 25, 2022 09:19
@antfu antfu merged commit fb39a68 into vueuse:main Oct 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants