-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: correctly update dynamic member expressions (#14359)
* fix: output template effect for svg xlink attribute * mark subtree dynamic in MemberExpression visitor * don't treat attributes and text nodes differently * Update .changeset/serious-spiders-bake.md --------- Co-authored-by: Rich Harris <rich.harris@vercel.com>
- Loading branch information
1 parent
012166e
commit 6e8267f
Showing
7 changed files
with
30 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'svelte': patch | ||
--- | ||
|
||
fix: correctly update dynamic member expressions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
packages/svelte/tests/runtime-legacy/samples/inline-expressions-3/_config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { test } from '../../test'; | ||
|
||
export default test({ | ||
html: `<div><svg aria-hidden="true" height="14" width="13"><use xlink:href="test#done"></use></svg></div` | ||
}); |
9 changes: 9 additions & 0 deletions
9
packages/svelte/tests/runtime-legacy/samples/inline-expressions-3/main.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<script> | ||
import { sprites } from './sprites.js' | ||
</script> | ||
|
||
<div> | ||
<svg width="13" height="14" aria-hidden="true"> | ||
<use xlink:href="{sprites['a']}#done"></use> | ||
</svg> | ||
</div> |
3 changes: 3 additions & 0 deletions
3
packages/svelte/tests/runtime-legacy/samples/inline-expressions-3/sprites.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export const sprites = { | ||
a: 'test' | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters