From c3b4c0a229a81775b497e634852e3494bd84a38c Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Fri, 25 Oct 2019 16:49:36 -0700 Subject: [PATCH] frontend_tests: Use let with explicit null in components test. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Even though this variable was only assigned once, it was accessed before its initialization, so it couldn’t be converted directly to `let` or `const`. Use `let` with an explicit `null` to make it clearer what’s going on and satisfy ESLint. (Why not `undefined`? There’s an ESLint rule against that too.) Signed-off-by: Anders Kaseorg --- frontend_tests/node_tests/components.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend_tests/node_tests/components.js b/frontend_tests/node_tests/components.js index ee96497e06..9d093ac8d5 100644 --- a/frontend_tests/node_tests/components.js +++ b/frontend_tests/node_tests/components.js @@ -124,7 +124,7 @@ run_test('basics', () => { var callback_value; - var widget; + let widget = null; widget = components.toggle({ selected: 0, values: [