stlapview: remove eval & comment

master
Rob Pilling 2023-05-16 23:25:21 +01:00
parent d595b5a9e1
commit 2efc24c5a4
1 changed files with 1 additions and 4 deletions

View File

@ -93,11 +93,8 @@ function showMainMenu() {
}
};
//I know eval is evil, but I can't think of any other way to do this.
for (let lapFile of LAP_FILES) {
mainMenu[fileNameToDateString(lapFile)] = eval(`(function() {
view('${lapFile}');
})`);
mainMenu[fileNameToDateString(lapFile)] = () => view(lapFile);
}
if (LAP_FILES.length == 0) {