Skip to content

Commit d7c2d50

Browse files
committed
code golf
1 parent 5446ba8 commit d7c2d50

File tree

1 file changed

+5
-4
lines changed
  • packages/svelte/src/internal/client

1 file changed

+5
-4
lines changed

packages/svelte/src/internal/client/each.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -786,15 +786,16 @@ export function get_first_element(block) {
786786
* @returns {void}
787787
*/
788788
function update_each_item_block(block, item, index, type) {
789+
const block_v = block.v;
789790
if ((type & EACH_ITEM_REACTIVE) !== 0) {
790-
set_signal_value(block.v, item);
791-
} else if (is_lazy_property(block.v)) {
791+
set_signal_value(block_v, item);
792+
} else if (is_lazy_property(block_v)) {
792793
// If we have lazy properties, it means that an array was used that has been
793794
// proxied. Given this, we need to re-sync the old array by mutating the backing
794795
// value to be the latest value to ensure the UI updates correctly. TODO: maybe
795796
// we should bypass any internal mutation checks for this?
796-
const o = block.v.o;
797-
const p = block.v.p;
797+
const o = block_v.o;
798+
const p = block_v.p;
798799
const prev = o[p];
799800
if (prev !== item) {
800801
o[p] = item;

0 commit comments

Comments
 (0)