From 2409123d66728e143a0ea94bc3a264b253d6ca6d Mon Sep 17 00:00:00 2001 From: Christopher Allen Date: Tue, 3 Sep 2024 15:27:40 +0100 Subject: [PATCH] refactor: Omit unused exception arguments from catch blocks (#8559) Fixes #1770. --- appengine/blockly_compressed.js | 2 +- scripts/gulpfiles/build_tasks.js | 2 +- tests/compile/main.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/appengine/blockly_compressed.js b/appengine/blockly_compressed.js index dc118dfbe..837d6bb35 100644 --- a/appengine/blockly_compressed.js +++ b/appengine/blockly_compressed.js @@ -6,6 +6,6 @@ var msg = 'Compiled Blockly files should be loaded from https://unpkg.com/blockl console.log(msg); try { alert(msg); -} catch (_e) { +} catch { // Can't alert? Probably node.js. } diff --git a/scripts/gulpfiles/build_tasks.js b/scripts/gulpfiles/build_tasks.js index 27a02cf30..a00c1b17d 100644 --- a/scripts/gulpfiles/build_tasks.js +++ b/scripts/gulpfiles/build_tasks.js @@ -699,7 +699,7 @@ function buildAdvancedCompilationTest() { // a later browser-based test won't check it should the compile fail. try { fs.unlinkSync('./tests/compile/main_compressed.js'); - } catch (_e) { + } catch { // Probably it didn't exist. } diff --git a/tests/compile/main.js b/tests/compile/main.js index 9144c4d3b..bbca3909f 100644 --- a/tests/compile/main.js +++ b/tests/compile/main.js @@ -47,7 +47,7 @@ window['healthCheck'] = function() { const blockCount = getMainWorkspace().getFlyout().getWorkspace().getTopBlocks().length; return (blockCount > 5 && blockCount < 100); - } catch (_e) { + } catch { return false; } };