fix(templateRef): prevent duplicate onScopeDispose registrations for dynamic template refs#14161
fix(templateRef): prevent duplicate onScopeDispose registrations for dynamic template refs#14161edison1105 merged 4 commits intominorfrom
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
Size ReportBundles
Usages
|
@vue/compiler-core
@vue/compiler-dom
@vue/compiler-sfc
@vue/compiler-ssr
@vue/compiler-vapor
@vue/reactivity
@vue/runtime-core
@vue/runtime-dom
@vue/runtime-vapor
@vue/server-renderer
@vue/shared
vue
@vue/compat
commit: |
There was a problem hiding this comment.
Pull request overview
This PR optimizes the template ref handling in runtime-vapor by conditionally creating the canSetSetupRef checker only in development mode. In production builds, it uses the NO constant instead, avoiding unnecessary function creation and setup state access.
Key Changes
- Replaced direct
hasOwncheck with the more comprehensivecanSetSetupReffunction that provides additional dev-mode warnings - Conditionally creates
canSetSetupRefonly when__DEV__is true, usingNOas a fallback in production - Updated imports to replace
hasOwnwithNO
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.