Skip to content

Commit

Permalink
Fix: allow not having scopes in config
Browse files Browse the repository at this point in the history
  • Loading branch information
jrencz committed Mar 17, 2017
1 parent 5494de1 commit 3a9e2dd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/scopedConfigReader.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
* @returns {Object.<string, *>} - 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('./')
Expand Down

0 comments on commit 3a9e2dd

Please # to comment.