Skip to content

Commit 965c253

Browse files
authored
fix: declare setupfee_off_with_symbol locally to avoid implicit global (#1247)
Add let declaration for setupfee_off_with_symbol inside the applies_to_setup_fee block, mirroring the pattern used for off_with_symbol. Without this, the variable was assigned without let/const/var at lines 172 and 174, creating an implicit global write. Resolves #1237
1 parent f18968f commit 965c253

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

assets/js/coupon-code.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@
167167
}
168168

169169
if (applies_to_setup_fee) {
170+
let setupfee_off_with_symbol = '';
170171

171172
if (setup_fee_discount_type != '"absolute"') {
172173
setupfee_off_with_symbol = ''.concat(setup_fee_discount_value, '%');

0 commit comments

Comments
 (0)