fix weapons collection crash at page 6
use index key instead of weapon.id to avoid svelte 5 keyed each bug at 250+ items
This commit is contained in:
parent
f47770dbfb
commit
8a07691c0b
1 changed files with 2 additions and 2 deletions
|
|
@ -152,7 +152,7 @@
|
||||||
</div>
|
</div>
|
||||||
{:else if currentViewMode === 'grid'}
|
{:else if currentViewMode === 'grid'}
|
||||||
<div class="weapon-grid">
|
<div class="weapon-grid">
|
||||||
{#each allWeapons as weapon (weapon.id)}
|
{#each allWeapons as weapon, i (i)}
|
||||||
<SelectableCollectionCard id={weapon.id} onClick={() => openWeaponDetails(weapon)}>
|
<SelectableCollectionCard id={weapon.id} onClick={() => openWeaponDetails(weapon)}>
|
||||||
<CollectionWeaponCard {weapon} />
|
<CollectionWeaponCard {weapon} />
|
||||||
</SelectableCollectionCard>
|
</SelectableCollectionCard>
|
||||||
|
|
@ -160,7 +160,7 @@
|
||||||
</div>
|
</div>
|
||||||
{:else}
|
{:else}
|
||||||
<div class="weapon-list">
|
<div class="weapon-list">
|
||||||
{#each allWeapons as weapon (weapon.id)}
|
{#each allWeapons as weapon, i (i)}
|
||||||
<SelectableCollectionRow id={weapon.id} onClick={() => openWeaponDetails(weapon)}>
|
<SelectableCollectionRow id={weapon.id} onClick={() => openWeaponDetails(weapon)}>
|
||||||
<CollectionWeaponRow {weapon} />
|
<CollectionWeaponRow {weapon} />
|
||||||
</SelectableCollectionRow>
|
</SelectableCollectionRow>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue