fix(footer): stop generating collision-prone social-link ids, fragile track key
createSocialLinkRow derived the new id from the current array length
(social-${length+1}). Add/remove/add cycles reliably reproduce a duplicate
id: add,add -> social-1/social-2; remove social-1 -> array length 1; add
-> social-2 again, colliding with the surviving row. footer.component.html
tracks footer nav items by id (@for ... track item.id), so a duplicate id
there corrupts Angular's DOM reuse on the public storefront footer.
Also switched the payment-icon @for from track icon.src to track $index -
two icon rows sharing a src (most commonly two blank ones) hit the same bug.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
<div class="app-footer__group">
|
||||
<h4>{{ 'footer.payment' | translate }}</h4>
|
||||
<div class="app-footer__payments">
|
||||
@for (icon of paymentIcons(); track icon.src) {
|
||||
@for (icon of paymentIcons(); track $index) {
|
||||
<img [src]="icon.src" [alt]="icon.alt" loading="lazy" [width]="icon.width" [height]="icon.height" />
|
||||
}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user