Skip to content

Commit 188fa49

Browse files
committed
Fix wrong boolean casts in filter.js
1 parent 9f9bda4 commit 188fa49

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/filter.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ function isAlreadyInstalled(info) {
1212

1313
function isUnstable(info) {
1414
// Check for hyphen in version string as this is a prerelease version according to SemVer
15-
return info.updateTo && info.updateTo.indexOf("-") !== -1;
15+
return Boolean(info.updateTo && info.updateTo.indexOf("-") !== -1);
1616
}
1717

1818
function isExcluded(info, exclude) {
@@ -22,7 +22,7 @@ function isExcluded(info, exclude) {
2222
}
2323

2424
function isCurrentGreaterThanUpdateTo(info) {
25-
return info.current && info.updateTo !== "git" && semver.gt(info.current, info.updateTo);
25+
return Boolean(info.current && info.updateTo !== "git" && semver.gt(info.current, info.updateTo));
2626
}
2727

2828
function filter(config) {

0 commit comments

Comments
 (0)