Skip to content

Commit

Permalink
fix: skip incremental update for slot name
Browse files Browse the repository at this point in the history
close #2207
  • Loading branch information
johnsoncodehk committed Dec 18, 2022
1 parent 93ce562 commit 42d0920
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -80,6 +80,9 @@ const plugin: VueLanguagePlugin = ({ modules }) => {
}
}
else if (node.type === CompilerDOM.NodeTypes.DIRECTIVE) {
if (node.arg && withinChangeRange(node.arg.loc) && node.name === 'slot') {
return false;
}
if (node.arg && !tryUpdateNode(node.arg)) {
return false;
}
Expand Down Expand Up @@ -136,7 +139,7 @@ const plugin: VueLanguagePlugin = ({ modules }) => {
}
}
else if (node.type === CompilerDOM.NodeTypes.SIMPLE_EXPRESSION) {
if (withinChangeRange(node.loc) && node.isStatic) { // slot name
if (withinChangeRange(node.loc) && node.isStatic) { // TODO: review this (slot name?)
return false;
}
node.content = node.loc.source;
Expand Down

0 comments on commit 42d0920

Please sign in to comment.