Skip to content

Commit 50d0746

Browse files
NLB-7074: Fix js issue
1 parent e05393e commit 50d0746

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

static/nginxaas-azure/js/cost-calculator_v2.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,6 @@
136136
* @returns {string}
137137
*/
138138
currencyFormatter: (n, significantDigits = 5) => {
139-
console.log('Formatting number to currency:', n, 'with significantDigits:', significantDigits);
140139
const options = {
141140
style: "currency",
142141
currency: "USD"
@@ -369,7 +368,10 @@
369368
if (curEl.tagName.toLowerCase() === "input" || curEl.tagName.toLowerCase() === "select") {
370369
curEl.value = values[elName];
371370
} else {
372-
$(curEl).children("input").first().value = values[elName];
371+
const inputEl = curEl.querySelector("input");
372+
if (inputEl) {
373+
inputEl.value = values[elName];
374+
}
373375
}
374376
});
375377
};
@@ -385,7 +387,10 @@
385387
if (curEl.tagName.toLowerCase() === "input" || curEl.tagName.toLowerCase() === "select") {
386388
curEl.value = values[elName];
387389
} else {
388-
$(curEl).children("input").first().value = values[elName];
390+
const inputEl = curEl.querySelector("input");
391+
if (inputEl) {
392+
inputEl.value = values[elName];
393+
}
389394
}
390395
});
391396

0 commit comments

Comments
 (0)