From 2efc24c5a406954befa01a561f34143b82a24169 Mon Sep 17 00:00:00 2001 From: Rob Pilling Date: Tue, 16 May 2023 23:25:21 +0100 Subject: [PATCH] stlapview: remove eval & comment --- apps/stlapview/app.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/apps/stlapview/app.js b/apps/stlapview/app.js index 22aa2e43b..7d70be071 100644 --- a/apps/stlapview/app.js +++ b/apps/stlapview/app.js @@ -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) {