Browse Source

chore(compiler-sfc): change `let start` to `const start` (#12849)

Aaron-zon 1 year ago
parent
commit
99551e387a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      packages/compiler-sfc/src/rewriteDefault.ts

+ 1 - 1
packages/compiler-sfc/src/rewriteDefault.ts

@@ -39,7 +39,7 @@ export function rewriteDefaultAST(
   ast.forEach(node => {
   ast.forEach(node => {
     if (node.type === 'ExportDefaultDeclaration') {
     if (node.type === 'ExportDefaultDeclaration') {
       if (node.declaration.type === 'ClassDeclaration' && node.declaration.id) {
       if (node.declaration.type === 'ClassDeclaration' && node.declaration.id) {
-        let start: number =
+        const start: number =
           node.declaration.decorators && node.declaration.decorators.length > 0
           node.declaration.decorators && node.declaration.decorators.length > 0
             ? node.declaration.decorators[
             ? node.declaration.decorators[
                 node.declaration.decorators.length - 1
                 node.declaration.decorators.length - 1