Skip to content

Commit 3107b57

Browse files
committed
refactor: isVNode -> isVOnce
1 parent 2815531 commit 3107b57

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

packages/compiler-core/src/ast.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ export interface CacheExpression extends Node {
416416
type: NodeTypes.JS_CACHE_EXPRESSION
417417
index: number
418418
value: JSChildNode
419-
isVNode: boolean
419+
isVOnce: boolean
420420
}
421421

422422
export interface MemoExpression extends CallExpression {
@@ -771,13 +771,13 @@ export function createConditionalExpression(
771771
export function createCacheExpression(
772772
index: number,
773773
value: JSChildNode,
774-
isVNode: boolean = false,
774+
isVOnce: boolean = false,
775775
): CacheExpression {
776776
return {
777777
type: NodeTypes.JS_CACHE_EXPRESSION,
778778
index,
779779
value,
780-
isVNode,
780+
isVOnce,
781781
loc: locStub,
782782
}
783783
}

packages/compiler-core/src/codegen.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1037,14 +1037,14 @@ function genConditionalExpression(
10371037
function genCacheExpression(node: CacheExpression, context: CodegenContext) {
10381038
const { push, helper, indent, deindent, newline } = context
10391039
push(`_cache[${node.index}] || (`)
1040-
if (node.isVNode) {
1040+
if (node.isVOnce) {
10411041
indent()
10421042
push(`${helper(SET_BLOCK_TRACKING)}(-1),`)
10431043
newline()
10441044
}
10451045
push(`_cache[${node.index}] = `)
10461046
genNode(node.value, context)
1047-
if (node.isVNode) {
1047+
if (node.isVOnce) {
10481048
push(`,`)
10491049
newline()
10501050
push(`${helper(SET_BLOCK_TRACKING)}(1),`)

0 commit comments

Comments
 (0)