Skip to content

Commit

Permalink
Fix error checking in CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
xzyfer committed Apr 16, 2018
1 parent 1ddf01c commit 5dd065e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/sassgraph
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ if (['ancestors', 'descendents'].indexOf(argv._[0]) !== -1) {
command = argv._.shift();
}

if (argv._ && path.extname(argv._[0]) === '') {
if (argv._.length && path.extname(argv._[0]) === '') {
directory = argv._.shift();
}

if (argv._ && path.extname(argv._[0])) {
if (argv._.length && path.extname(argv._[0])) {
file = argv._.shift();
}

Expand Down

0 comments on commit 5dd065e

Please sign in to comment.