Skip to content

Commit

Permalink
FIx config loader
Browse files Browse the repository at this point in the history
- Add check for case when  `ignore` is undefined
- Update dependencies
  • Loading branch information
nikolay-borzov committed Oct 4, 2019
1 parent dca8c41 commit b916df6
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 21 deletions.
32 changes: 16 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "torrent-clean",
"version": "1.4.0",
"version": "1.4.1",
"description": "Removes files that are not specified in selected torrent file",
"author": "Nikolay Borzov <[email protected]>",
"license": "MIT",
Expand All @@ -25,20 +25,20 @@
"chalk": "^2.4.2",
"cosmiconfig": "^5.2.1",
"delete-empty": "^3.0.0",
"enquirer": "^2.3.1",
"enquirer": "^2.3.2",
"memory-chunk-store": "^1.3.0",
"minimist": "^1.2.0",
"recursive-readdir": "^2.2.2",
"webtorrent": "^0.107.16"
},
"devDependencies": {
"babel-eslint": "^10.0.3",
"eslint": "^6.4.0",
"eslint": "^6.5.1",
"eslint-config-prettier": "^6.3.0",
"eslint-config-standard": "^14.1.0",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-node": "^10.0.0",
"eslint-plugin-prettier": "^3.1.0",
"eslint-plugin-prettier": "^3.1.1",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.1",
"prettier": "^1.18.2"
Expand Down
6 changes: 5 additions & 1 deletion src/config-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ function loadConfig(searchFrom) {
.reverse()
.reduce(merge, {})

mergedConfig.ignore = [...IGNORE_GLOBS, ...mergedConfig.ignore]
if (mergedConfig.ignore) {
mergedConfig.ignore = [...IGNORE_GLOBS, ...mergedConfig.ignore]
} else {
mergedConfig.ignore = IGNORE_GLOBS
}

return mergedConfig
}
Expand Down

0 comments on commit b916df6

Please sign in to comment.