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()
|
||||
}
|
||||
|
||||
/**
|
||||
* Test only
|
||||
*/
|
||||
export function getDepFromReactive(
|
||||
object: any,
|
||||
key: string | number | symbol,
|
||||
): Dep | undefined {
|
||||
// eslint-disable-next-line
|
||||
return targetMap.get(object)?.get(key)
|
||||
const depMap = targetMap.get(object)
|
||||
return depMap && depMap.get(key)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue