From b22226c68b2eba86ba3f027759af751156f0e93d Mon Sep 17 00:00:00 2001 From: Bryan Casler Date: Fri, 13 Feb 2026 17:05:39 -0500 Subject: [PATCH] fix: resolve verifiable bugs in other-amount.ts and src-defer.ts - Fix invalid event type in addEventListener in other-amount.ts - Add null check for lastRadioInput in other-amount.ts - Fix replaceChild arguments in src-defer.ts to properly clone video element --- packages/scripts/dist/other-amount.js | 4 +++- packages/scripts/dist/src-defer.js | 19 ++++++++++--------- packages/scripts/src/other-amount.ts | 6 ++++-- packages/scripts/src/src-defer.ts | 19 ++++++++++--------- 4 files changed, 27 insertions(+), 21 deletions(-) diff --git a/packages/scripts/dist/other-amount.js b/packages/scripts/dist/other-amount.js index 0632ff53..01e76f54 100644 --- a/packages/scripts/dist/other-amount.js +++ b/packages/scripts/dist/other-amount.js @@ -63,7 +63,9 @@ export class OtherAmount { targetWrapper.classList.remove("en__field__item--hidden"); if (targetWrapper.parentNode) { const lastRadioInput = targetWrapper.parentNode.querySelector(".en__field__item:nth-last-child(2) input"); - lastRadioInput.checked = !0; + if (lastRadioInput) { + lastRadioInput.checked = true; + } } } } diff --git a/packages/scripts/dist/src-defer.js b/packages/scripts/dist/src-defer.js index 01cbb6e8..77ddc5f0 100644 --- a/packages/scripts/dist/src-defer.js +++ b/packages/scripts/dist/src-defer.js @@ -54,15 +54,16 @@ export class SrcDefer { } // To get the browser to request the video asset defined we need to remove the