Commit 33361c8c 33361c8c2330dc6bca2b1d5fbfcef65028443d12 by oncletom Committed by Nicolas Perriault

it's already undefined if not an object

1 parent f6b77402
......@@ -1120,7 +1120,7 @@ Casper.prototype.runStep = function runStep(step) {
}, this.options.stepTimeout, this, new Date().getTime(), this.test.currentSuiteNum + "-" + this.step);
}
this.emit('step.start', step);
stepResult = step.call(this, this.currentResponse || undefined);
stepResult = step.call(this, this.currentResponse);
if (utils.isFunction(this.options.onStepComplete)) {
this.options.onStepComplete.call(this, this, stepResult);
}
......