Skip to content

Commit 049f5ee

Browse files
committed
fix pull request 6
1 parent 65f75fb commit 049f5ee

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

coffee/assertions/jqueryElementNotPresent.coffee

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ exports.assertion = (selector, msg) ->
2323
return !value;
2424

2525
this.value = (result) ->
26+
return false if !result;
2627
return result.value;
2728

2829
this.command = (callback) ->

js/assertions/jqueryElementNotPresent.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ exports.assertion = function(selector, msg) {
2424
return !value;
2525
};
2626
this.value = function(result) {
27+
if (!result) {
28+
return false;
29+
}
2730
return result.value;
2831
};
2932
this.command = function(callback) {

0 commit comments

Comments
 (0)