fix(compiler-sfc): fix script setup ref assignment codegen edge case (#4520)

fix #4514
This commit is contained in:
edison
2021-09-06 06:02:50 +08:00
committed by GitHub
parent e6fe751b20
commit 5594643d7b
5 changed files with 59 additions and 14 deletions

View File

@@ -526,7 +526,7 @@ export function compileScript(
/**
* check defaults. If the default object is an object literal with only
* static properties, we can directly generate more optimzied default
* decalrations. Otherwise we will have to fallback to runtime merging.
* declarations. Otherwise we will have to fallback to runtime merging.
*/
function checkStaticDefaults() {
return (
@@ -895,7 +895,7 @@ export function compileScript(
}
}
// walk decalrations to record declared bindings
// walk declarations to record declared bindings
if (
(node.type === 'VariableDeclaration' ||
node.type === 'FunctionDeclaration' ||