diff --git a/packages/compiler-core/src/transforms/hoistStatic.ts b/packages/compiler-core/src/transforms/hoistStatic.ts index 733c903f..ecadeddf 100644 --- a/packages/compiler-core/src/transforms/hoistStatic.ts +++ b/packages/compiler-core/src/transforms/hoistStatic.ts @@ -116,8 +116,9 @@ function isStaticNode( if (node.tagType !== ElementTypes.ELEMENT) { return false } - if (resultCache.has(node)) { - return resultCache.get(node)! + const cached = resultCache.get(node) + if (cached !== undefined) { + return cached } const flag = getPatchFlag(node) if (!flag || flag === PatchFlags.TEXT) {