Skip to content

Commit da0601d

Browse files
committed
Added guard for func being undefined
1 parent f88a5d4 commit da0601d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/jasmine-node/jasmine/boot.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
return spec.doneFunc();
6565
}
6666
};
67-
if (func.length > 0) {
67+
if (func != null ? func.length : void 0) {
6868
wrappedFunc = function(done) {
6969
spec.doneFunc = done;
7070
func.call(this, wrappedDone);

src/jasmine/boot.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ boot = (jasmineRequire, clockCallback) ->
5353
return spec.doneFunc()
5454
return
5555

56-
if func.length > 0
56+
if func?.length
5757
wrappedFunc = (done) ->
5858
spec.doneFunc = done
5959
func.call(@, wrappedDone)

0 commit comments

Comments
 (0)