From c4f75016b57ba460596d31af0b8cd40aaf4c63f7 Mon Sep 17 00:00:00 2001 From: Simon Garner Date: Mon, 18 Mar 2024 15:27:20 +1300 Subject: [PATCH] =?UTF-8?q?fix:=20don=E2=80=99t=20use=20optional=20chainin?= =?UTF-8?q?g=20syntax?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/utils.js b/utils.js index 9c1b03e..4436284 100644 --- a/utils.js +++ b/utils.js @@ -61,7 +61,10 @@ const getSelectedDbs = () => { const valids = ['City', 'Country', 'ASN']; const config = getConfig(); - const selected = config?.['selected-dbs'] ?? valids; + const selected = + config != null && config['selected-dbs'] != null + ? config['selected-dbs'] + : valids; if (!Array.isArray(selected)) { console.error('selected-dbs property must have be an array.');