]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
chore(runtime-core): use NO instead of ()=>false (#13695)
authorzhangenming <282126346@qq.com>
Fri, 25 Jul 2025 00:45:38 +0000 (08:45 +0800)
committerGitHub <noreply@github.com>
Fri, 25 Jul 2025 00:45:38 +0000 (08:45 +0800)
packages/runtime-core/src/rendererTemplateRef.ts

index ca21030dc35d851a7c293e4d1dea84b3c8eacc7d..cea9e5b84388fee95f9ed5c747ec34e65244472c 100644 (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])) {