From 3a9e2ddbf414a2434512a041efd98db92613b228 Mon Sep 17 00:00:00 2001 From: Jarek Rencz Date: Fri, 17 Mar 2017 09:54:40 +0100 Subject: [PATCH] Fix: allow not having `scopes` in config --- lib/scopedConfigReader.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/scopedConfigReader.js b/lib/scopedConfigReader.js index 4cb5dad..624794a 100644 --- a/lib/scopedConfigReader.js +++ b/lib/scopedConfigReader.js @@ -4,6 +4,10 @@ * @returns {Object.} - values mapped by package name */ const getScopedValues = (propertyName, config) => { + if (!('scopes' in config)) { + return {}; + } + if (!(config.scope in config.scopes)) { throw new Error(`Unknown scope \`${ config.scope }\`. Known scopes are [${ Object.keys(config.scopes).join('./')