Skip to content

Commit 503799b

Browse files
committed
Fix to return booleans from convert
Removed last patch in e9855f0, but used in some other projects.
1 parent 32bc597 commit 503799b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

convert.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ function allFactory(test) {
3131
var key
3232

3333
for (key in test) {
34-
if (node[key] !== test[key]) return
34+
if (node[key] !== test[key]) return false
3535
}
3636

3737
return true
@@ -56,6 +56,8 @@ function anyFactory(tests) {
5656
return true
5757
}
5858
}
59+
60+
return false
5961
}
6062
}
6163

@@ -65,7 +67,7 @@ function typeFactory(test) {
6567
return type
6668

6769
function type(node) {
68-
return node && node.type === test
70+
return Boolean(node && node.type === test)
6971
}
7072
}
7173

0 commit comments

Comments
 (0)