getMeteredTiers uses ES2023 Array.prototype.toSorted without fallback
Author: stilla[bot]Created Sep 2, 2026Updated Sep 2, 2026
getMeteredTiers in clients/packages/checkout/src/utils/product.ts sorts tiers with .toSorted(), which throws on browsers that don't support ES2023 Array.prototype.toSorted (e.g. Safari < 16, older Chrome/Firefox), breaking checkout price rendering.
Same pattern exists elsewhere in the codebase (e.g. sortTiers in clients/packages/checkout/src/utils/units.ts, CheckoutProductSwitcher.tsx), so this is pre-existing and not introduced by #14110.
Flagged by cubic review on #14110. Fix by copying the array and using .sort(), or adding a runtime polyfill.
Sent by @maximevast from Checkout tiered metered pricing PR comment.
Source: polarsource/polar