From 34dac8a41413fd30077681f9ba58005bb018022f Mon Sep 17 00:00:00 2001 From: Laurent Mazet Date: Wed, 10 Jun 2020 23:01:37 +0200 Subject: [PATCH] cleaner static variable in downloadDictionary function --- public/trivabble.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/public/trivabble.js b/public/trivabble.js index d84a5ba..37f9a5f 100644 --- a/public/trivabble.js +++ b/public/trivabble.js @@ -151,9 +151,8 @@ } function downloadDictionary(code) { - if (typeof downloadDictionary.code === "undefined") { - downloadDictionary.code = ""; - } else if (downloadDictionary.code === code) { + /* static variable */ + if (downloadDictionary.code === code) { return; } downloadDictionary.code = code; @@ -172,7 +171,6 @@ } }; file.send(null); - return; } function removeElem(elem) { -- 2.30.2