refactor(compiler-core): avoid has call (#314)
This commit is contained in:
parent
b20b922d99
commit
6607edab2d
@ -116,8 +116,9 @@ function isStaticNode(
|
|||||||
if (node.tagType !== ElementTypes.ELEMENT) {
|
if (node.tagType !== ElementTypes.ELEMENT) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
if (resultCache.has(node)) {
|
const cached = resultCache.get(node)
|
||||||
return resultCache.get(node)!
|
if (cached !== undefined) {
|
||||||
|
return cached
|
||||||
}
|
}
|
||||||
const flag = getPatchFlag(node)
|
const flag = getPatchFlag(node)
|
||||||
if (!flag || flag === PatchFlags.TEXT) {
|
if (!flag || flag === PatchFlags.TEXT) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user