Commit dd5c9fda dd5c9fdaeb0e3d86270a8e85afb6db833d904fa7 by Nicolas Perriault

hunting unnecessary selves (!)

1 parent 5b02d6c6
Subproject commit 100ffeb02edee0d765efd29ef897c25343e24b2d
Subproject commit 80a376076317c87d865e839252bb25f8af9ca77d
......
......@@ -376,11 +376,9 @@ Casper.prototype.each = function each(array, fn) {
this.log("each() only works with arrays", "error");
return this;
}
(function _each(self) {
array.forEach(function _forEach(item, i) {
fn.call(self, self, item, i);
});
})(this);
array.forEach.call(this, function _forEach(item, i) {
fn.call(this, this, item, i);
});
return this;
};
......@@ -922,8 +920,8 @@ Casper.prototype.start = function start(location, then) {
}, this.options.timeout, this);
}
if (utils.isString(location) && location.length > 0) {
return this.thenOpen(location, utils.isFunction(then) ? then : this.createStep(function _step(self) {
self.log("start page is loaded", "debug");
return this.thenOpen(location, utils.isFunction(then) ? then : this.createStep(function _step() {
this.log("start page is loaded", "debug");
}));
}
return this;
......