Skip to content

Commit 97589a9

Browse files
NLB-7074: Fix js issue
1 parent 3310776 commit 97589a9

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
@@ -135,7 +135,6 @@
135135
* @returns {string}
136136
*/
137137
currencyFormatter: (n, significantDigits = 5) => {
138-
console.log('Formatting number to currency:', n, 'with significantDigits:', significantDigits);
139138
const options = {
140139
style: "currency",
141140
currency: "USD"
@@ -368,7 +367,10 @@
368367
if (curEl.tagName.toLowerCase() === "input" || curEl.tagName.toLowerCase() === "select") {
369368
curEl.value = values[elName];
370369
} else {
371-
$(curEl).children("input").first().value = values[elName];
370+
const inputEl = curEl.querySelector("input");
371+
if (inputEl) {
372+
inputEl.value = values[elName];
373+
}
372374
}
373375
});
374376
};
@@ -384,7 +386,10 @@
384386
if (curEl.tagName.toLowerCase() === "input" || curEl.tagName.toLowerCase() === "select") {
385387
curEl.value = values[elName];
386388
} else {
387-
$(curEl).children("input").first().value = values[elName];
389+
const inputEl = curEl.querySelector("input");
390+
if (inputEl) {
391+
inputEl.value = values[elName];
392+
}
388393
}
389394
});
390395

0 commit comments

Comments
 (0)