Skip to content

Commit

Permalink
Support envs as an object
Browse files Browse the repository at this point in the history
Fixes #209.
  • Loading branch information
sonicdoe committed Nov 9, 2017
1 parent 7f4cda6 commit 0f1a5ab
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/utils/style-settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,12 @@ function checkStyleSettings (filePath, textEditor) {
styleSettings.env = styleSettings.env || styleSettings.envs

if (styleSettings.env) {
if (!Array.isArray(styleSettings.env) && typeof styleSettings.env !== 'string') {
styleSettings.env = Object
.keys(styleSettings.env)
.filter(env => styleSettings.env[env])
}

settings.env = [].concat(styleSettings.env || [])
}
}
Expand Down

0 comments on commit 0f1a5ab

Please sign in to comment.