|
|
@@ -1037,14 +1037,14 @@ function genConditionalExpression(
|
|
|
function genCacheExpression(node: CacheExpression, context: CodegenContext) {
|
|
|
const { push, helper, indent, deindent, newline } = context
|
|
|
push(`_cache[${node.index}] || (`)
|
|
|
- if (node.isVNode) {
|
|
|
+ if (node.isVOnce) {
|
|
|
indent()
|
|
|
push(`${helper(SET_BLOCK_TRACKING)}(-1),`)
|
|
|
newline()
|
|
|
}
|
|
|
push(`_cache[${node.index}] = `)
|
|
|
genNode(node.value, context)
|
|
|
- if (node.isVNode) {
|
|
|
+ if (node.isVOnce) {
|
|
|
push(`,`)
|
|
|
newline()
|
|
|
push(`${helper(SET_BLOCK_TRACKING)}(1),`)
|