Skip to content

feat(sd): SD-11467 Fix misc. crashes#2615

Merged
parthshahp merged 2 commits intomasterfrom
SD-11467
Mar 2, 2026
Merged

feat(sd): SD-11467 Fix misc. crashes#2615
parthshahp merged 2 commits intomasterfrom
SD-11467

Conversation

@parthshahp
Copy link
Contributor

@parthshahp parthshahp commented Feb 24, 2026

What?

This PR fixes three performance/stability regressions, all related to SD-11467:

  1. Restore early onThemeBundleMain execution (templates/layout/base.html)

Fixed by checking typeof window.stencilBootstrap === 'function' (set synchronously when the bundle executes). If already loaded, call onThemeBundleMain() immediately; otherwise attach the load listener.

  1. Guard against null response in optionChangeDecorator (product-details-base.js)

Added if (err) return; guard before accessing response.data/response.content to prevent a secondary TypeError masking the real error.

  1. Fix updateWalletButtonsView crash on cart edit modal (product-details-base.js)

Used optional chaining (?.[0]?.checkValidity() ?? true) to handle the cart edit modal where no Add To Cart form exists, fixing a crash introduced in PR #2532.

Requirements

  • CHANGELOG.md entry added (required for code changes only)

Tickets / Documentation

Screenshots (if appropriate)

N/A — all fixes are JS/HTML logic with no visual changes.

@parthshahp parthshahp marked this pull request as ready for review March 2, 2026 16:03
@parthshahp parthshahp merged commit b60c3b1 into master Mar 2, 2026
1 check passed
@parthshahp parthshahp deleted the SD-11467 branch March 2, 2026 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants