Skip to content

Commit 5dd065e

Browse files
committedApr 16, 2018
Fix error checking in CLI
1 parent 1ddf01c commit 5dd065e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎bin/sassgraph

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ if (['ancestors', 'descendents'].indexOf(argv._[0]) !== -1) {
5858
command = argv._.shift();
5959
}
6060

61-
if (argv._ && path.extname(argv._[0]) === '') {
61+
if (argv._.length && path.extname(argv._[0]) === '') {
6262
directory = argv._.shift();
6363
}
6464

65-
if (argv._ && path.extname(argv._[0])) {
65+
if (argv._.length && path.extname(argv._[0])) {
6666
file = argv._.shift();
6767
}
6868

0 commit comments

Comments
 (0)
Please sign in to comment.