Skip to content

Commit

Permalink
fix(compiler-core): pick last char when dynamic directive doesn't clo…
Browse files Browse the repository at this point in the history
…se (#4507)
  • Loading branch information
HerringtonDarkholme authored Sep 7, 2021
1 parent 1c4f0f0 commit 5d262e0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6260,7 +6260,7 @@ Object {
Object {
"arg": Object {
"constType": 0,
"content": "se",
"content": "sef",
"isStatic": false,
"loc": Object {
"end": Object {
Expand Down
5 changes: 3 additions & 2 deletions packages/compiler-core/src/parse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -814,9 +814,10 @@ function parseAttribute(
context,
ErrorCodes.X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END
)
content = content.substr(1)
} else {
content = content.substr(1, content.length - 2)
}

content = content.substr(1, content.length - 2)
} else if (isSlot) {
// #1241 special case for v-slot: vuetify relies extensively on slot
// names containing dots. v-slot doesn't have any modifiers and Vue 2.x
Expand Down

0 comments on commit 5d262e0

Please sign in to comment.