mirror of https://github.com/vuejs/core.git
refactor(reactivity): avoid optional chaining in getDepFromReactive (#12007)
This commit is contained in:
parent
7a00f6f093
commit
c0e9434414
|
@ -378,13 +378,10 @@ export function trigger(
|
||||||
endBatch()
|
endBatch()
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Test only
|
|
||||||
*/
|
|
||||||
export function getDepFromReactive(
|
export function getDepFromReactive(
|
||||||
object: any,
|
object: any,
|
||||||
key: string | number | symbol,
|
key: string | number | symbol,
|
||||||
): Dep | undefined {
|
): Dep | undefined {
|
||||||
// eslint-disable-next-line
|
const depMap = targetMap.get(object)
|
||||||
return targetMap.get(object)?.get(key)
|
return depMap && depMap.get(key)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue