fix(reactivity): fix tracking for readonly + reactive Map (#3604)

fix #3602
This commit is contained in:
HcySunYang
2021-05-08 06:49:11 +08:00
committed by GitHub
parent c8d96837b8
commit 5036c51cb7
2 changed files with 34 additions and 1 deletions

View File

@@ -49,6 +49,10 @@ function get(
return wrap(target.get(key))
} else if (has.call(rawTarget, rawKey)) {
return wrap(target.get(rawKey))
} else if (target !== rawTarget) {
// #3602 readonly(reactive(Map))
// ensure that the nested reactive `Map` can do tracking for itself
target.get(key)
}
}