Skip to content

Commit

Permalink
refactor: use .isEmpty to express the intent in a clearer way
Browse files Browse the repository at this point in the history
Co-Authored-By: honzajavorek <mail@honzajavorek.cz>
  • Loading branch information
kylef and honzajavorek committed Jan 26, 2019
1 parent 034becf commit 462abb4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/parse.js
Expand Up @@ -39,7 +39,7 @@ Falling back to API Blueprint by default.
} else if (err) {
// Turning Fury error object into standard JavaScript error
nativeError = new Error(err.message);
} else if (apiElements && apiElements.errors.length) {
} else if (apiElements && !apiElements.errors.isEmpty) {
nativeError = new Error('Parser finished with errors');
}

Expand Down

0 comments on commit 462abb4

Please sign in to comment.