Skip to content

Commit

Permalink
fix: don’t use optional chaining syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
sgarner committed Mar 18, 2024
1 parent 7781fbe commit c4f7501
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.');
Expand Down

0 comments on commit c4f7501

Please sign in to comment.