mirror of https://github.com/vuejs/core.git
chore(runtime-core): use NO instead of ()=>false (#13695)
This commit is contained in:
parent
911e67045e
commit
31f798581c
|
@ -2,6 +2,7 @@ import type { SuspenseBoundary } from './components/Suspense'
|
||||||
import type { VNode, VNodeNormalizedRef, VNodeNormalizedRefAtom } from './vnode'
|
import type { VNode, VNodeNormalizedRef, VNodeNormalizedRefAtom } from './vnode'
|
||||||
import {
|
import {
|
||||||
EMPTY_OBJ,
|
EMPTY_OBJ,
|
||||||
|
NO,
|
||||||
ShapeFlags,
|
ShapeFlags,
|
||||||
hasOwn,
|
hasOwn,
|
||||||
isArray,
|
isArray,
|
||||||
|
@ -77,7 +78,7 @@ export function setRef(
|
||||||
const rawSetupState = toRaw(setupState)
|
const rawSetupState = toRaw(setupState)
|
||||||
const canSetSetupRef =
|
const canSetSetupRef =
|
||||||
setupState === EMPTY_OBJ
|
setupState === EMPTY_OBJ
|
||||||
? () => false
|
? NO
|
||||||
: (key: string) => {
|
: (key: string) => {
|
||||||
if (__DEV__) {
|
if (__DEV__) {
|
||||||
if (hasOwn(rawSetupState, key) && !isRef(rawSetupState[key])) {
|
if (hasOwn(rawSetupState, key) && !isRef(rawSetupState[key])) {
|
||||||
|
|
Loading…
Reference in New Issue