chore(runtime-core): use NO instead of ()=>false (#13695)

This commit is contained in:
zhangenming 2025-07-25 08:45:38 +08:00 committed by GitHub
parent 911e67045e
commit 31f798581c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -2,6 +2,7 @@ import type { SuspenseBoundary } from './components/Suspense'
import type { VNode, VNodeNormalizedRef, VNodeNormalizedRefAtom } from './vnode'
import {
EMPTY_OBJ,
NO,
ShapeFlags,
hasOwn,
isArray,
@ -77,7 +78,7 @@ export function setRef(
const rawSetupState = toRaw(setupState)
const canSetSetupRef =
setupState === EMPTY_OBJ
? () => false
? NO
: (key: string) => {
if (__DEV__) {
if (hasOwn(rawSetupState, key) && !isRef(rawSetupState[key])) {