From 7235bc6c2873d551771918beb09f12428d9770f6 Mon Sep 17 00:00:00 2001 From: Steel Brain Date: Wed, 12 Apr 2017 19:53:46 +0500 Subject: [PATCH] :facepalm: Use default value of array when undefined --- src/helpers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/helpers.js b/src/helpers.js index 396c102..1aa36fc 100644 --- a/src/helpers.js +++ b/src/helpers.js @@ -82,7 +82,7 @@ export async function getDependencies(packageName: string): Promise): Promise<'Yes' | 'No' | 'Never'> { const oldConfigPath = Path.join(atom.getConfigDirPath(), 'package-deps-state.json') - let ignoredPackages = atom.config.get('atom-package-deps.ignored') + let ignoredPackages = atom.config.get('atom-package-deps.ignored') || [] if (await FS.exists(oldConfigPath)) { const oldConfig = JSON.parse(await FS.readFile(oldConfigPath, 'utf8'))