Skip to content

Commit

Permalink
Romdisk: Fix a bug of index algorithm
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonMo1 committed Sep 2, 2023
1 parent f82d33a commit e0704d0
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions frontend/readrom.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,16 +103,17 @@ function processIndex(index) {

/* Generate an HTML option out of each entry */
for (var key in index) {
if (typeof index[key] == "object") {
let this_option = to_separator(key);
if (typeof index[key][0] == "object") {
this_option += Object.values(index[key]).map(to_option).join("");
}
else {
this_option += to_option(index[key]);
}
all_options += this_option;
break;
switch (typeof index[key]) {
case "object":
let this_option = to_separator(key);
if (typeof index[key][0] == "object") {
this_option += Object.values(index[key]).map(to_option).join("");
}
else {
this_option += to_option(index[key]);
}
all_options += this_option;
break;
}
}

Expand Down

0 comments on commit e0704d0

Please sign in to comment.