Skip to content

Commit

Permalink
Update: Simplify onlyErrors logic
Browse files Browse the repository at this point in the history
  • Loading branch information
jmm authored and phated committed Jan 4, 2019
1 parent 5f6c40d commit 82956bc
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ exports.prepare = function (extensions, filepath, cwd, nothrow) {
var option, attempt;
var attempts = [];
var err;
var onlyErrors = false;
var onlyErrors = true;
var ext = extension(filepath);
if (Object.keys(require.extensions).indexOf(ext) !== -1) {
return true;
Expand Down Expand Up @@ -42,8 +42,6 @@ exports.prepare = function (extensions, filepath, cwd, nothrow) {
if (!error) {
onlyErrors = false;
break;
} else {
onlyErrors = true;
}
}
if (onlyErrors) {
Expand Down

0 comments on commit 82956bc

Please sign in to comment.