Skip to content

Commit fe2ab1b

Browse files
authored
chore: remove unused variable (#11842)
1 parent b1430f2 commit fe2ab1b

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

packages/compiler-core/src/transform.ts

-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import {
2323
import {
2424
EMPTY_OBJ,
2525
NOOP,
26-
PatchFlagNames,
2726
PatchFlags,
2827
camelize,
2928
capitalize,
@@ -375,15 +374,13 @@ function createRootCodegen(root: RootNode, context: TransformContext) {
375374
} else if (children.length > 1) {
376375
// root has multiple nodes - return a fragment block.
377376
let patchFlag = PatchFlags.STABLE_FRAGMENT
378-
let patchFlagText = PatchFlagNames[PatchFlags.STABLE_FRAGMENT]
379377
// check if the fragment actually contains a single valid child with
380378
// the rest being comments
381379
if (
382380
__DEV__ &&
383381
children.filter(c => c.type !== NodeTypes.COMMENT).length === 1
384382
) {
385383
patchFlag |= PatchFlags.DEV_ROOT_FRAGMENT
386-
patchFlagText += `, ${PatchFlagNames[PatchFlags.DEV_ROOT_FRAGMENT]}`
387384
}
388385
root.codegenNode = createVNodeCall(
389386
context,

packages/compiler-core/src/transforms/vIf.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import { processExpression } from './transformExpression'
3232
import { validateBrowserExpression } from '../validateExpression'
3333
import { CREATE_COMMENT, FRAGMENT } from '../runtimeHelpers'
3434
import { findDir, findProp, getMemoedVNodeCall, injectProp } from '../utils'
35-
import { PatchFlagNames, PatchFlags } from '@vue/shared'
35+
import { PatchFlags } from '@vue/shared'
3636

3737
export const transformIf: NodeTransform = createStructuralDirectiveTransform(
3838
/^(if|else|else-if)$/,
@@ -264,7 +264,6 @@ function createChildrenCodegenNode(
264264
return vnodeCall
265265
} else {
266266
let patchFlag = PatchFlags.STABLE_FRAGMENT
267-
let patchFlagText = PatchFlagNames[PatchFlags.STABLE_FRAGMENT]
268267
// check if the fragment actually contains a single valid child with
269268
// the rest being comments
270269
if (
@@ -273,7 +272,6 @@ function createChildrenCodegenNode(
273272
children.filter(c => c.type !== NodeTypes.COMMENT).length === 1
274273
) {
275274
patchFlag |= PatchFlags.DEV_ROOT_FRAGMENT
276-
patchFlagText += `, ${PatchFlagNames[PatchFlags.DEV_ROOT_FRAGMENT]}`
277275
}
278276

279277
return createVNodeCall(

0 commit comments

Comments
 (0)