We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
$.unwrap
1 parent d8212f4 commit 29e6424Copy full SHA for 29e6424
.changeset/dry-hotels-matter.md
@@ -0,0 +1,5 @@
1
+---
2
+'svelte': patch
3
4
+
5
+feat: remove $.unwrap calls from each block indexes
packages/svelte/src/compiler/phases/3-transform/client/visitors/template.js
@@ -2556,7 +2556,9 @@ export const template_visitors = {
2556
if (node.index) {
2557
child_state.getters[node.index] = (id) => {
2558
const index_with_loc = with_loc(index, id);
2559
- return b.call('$.unwrap', index_with_loc);
+ return (flags & EACH_INDEX_REACTIVE) === 0
2560
+ ? index_with_loc
2561
+ : b.call('$.get', index_with_loc);
2562
};
2563
2564
key_state.getters[node.index] = b.id(node.index);
0 commit comments