Skip to content

refThrottled fix: 🧩 fixed reference issues for complex data types #3705

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

Closed
wants to merge 13 commits into from
Closed
Prev Previous commit
Next Next commit
fix: 🧩 error message
  • Loading branch information
17359898647 committed Jan 10, 2024
commit 393da8f48a17062101ffe5c359fbc2fcca1bcdc0
9 changes: 6 additions & 3 deletions packages/shared/refThrottled/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,13 @@ export function refThrottled<T>(value: Ref<T>, delay = 200, trailing = true, lea
throttled.value = isReferenceType(value.value) ? cloneHandler(value.value) : value.value
}
catch (error) {
if (isEqualityClone)
throttled.value = 'Error refThrottled' as any
else
if (isEqualityClone) {
throttled.value = value.value
console.error('Some error occurred in cloneHandler, used uncloned value', error)
}
else {
throw error
}
}
}
setThrottled()
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy