Skip to content

Commit 803994b

Browse files
authored
Update default.html
1 parent 6fdb110 commit 803994b

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

_layouts/default.html

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -219,23 +219,16 @@ <h3 class="h5 card-title">Explore More Currency Tools</h3>
219219
function populateCurrencies() {
220220
fromSelect.innerHTML = '';
221221
toSelect.innerHTML = '';
222-
223-
// Sort currencies alphabetically
224-
const sortedCurrencies = Object.keys(conversionRates).sort((a, b) => {
225-
return currencyNames[a].localeCompare(currencyNames[b]);
226-
});
227-
228-
for (const currencyCode of sortedCurrencies) {
222+
for (const currencyCode in conversionRates) {
229223
const fullName = currencyNames[currencyCode] || currencyCode;
230224
const optionText = `${currencyCode} - ${fullName}`;
231225

232226
fromSelect.add(new Option(optionText, currencyCode));
233227
toSelect.add(new Option(optionText, currencyCode));
234228
}
235229

236-
// Set default values
237-
fromSelect.value = 'SAR';
238-
toSelect.value = 'PKR';
230+
fromSelect.value = 'SAR'; // Default to SAR
231+
toSelect.value = 'PKR'; // Default to PKR
239232

240233
fieldset.disabled = false;
241234
statusText.textContent = `Rates last updated: ${new Date(lastUpdated).toLocaleString()}`;

0 commit comments

Comments
 (0)