Fix Build: Firefox doesn't hoist function definitions in for loops

This commit is contained in:
Dan Hansen and Davis W. Frank
2013-02-19 15:26:08 -08:00
parent af71f4d2f9
commit c53b36a9b2
2 changed files with 12 additions and 12 deletions

View File

@@ -1734,12 +1734,6 @@ jasmine.Suite.prototype.execute = function(onComplete) {
for (var i = 0; i < children.length; i++) {
allFns.push(wrapChild(children[i]));
function wrapChild(child) {
return function(done) {
child.execute(done);
}
}
}
this.onStart(this);
@@ -1756,6 +1750,12 @@ jasmine.Suite.prototype.execute = function(onComplete) {
onComplete();
}
}
function wrapChild(child) {
return function (done) {
child.execute(done);
}
}
};
jasmine.Clock = function(global, delayedFunctionScheduler) {
var self = this,

View File

@@ -74,12 +74,6 @@ jasmine.Suite.prototype.execute = function(onComplete) {
for (var i = 0; i < children.length; i++) {
allFns.push(wrapChild(children[i]));
function wrapChild(child) {
return function(done) {
child.execute(done);
}
}
}
this.onStart(this);
@@ -96,4 +90,10 @@ jasmine.Suite.prototype.execute = function(onComplete) {
onComplete();
}
}
function wrapChild(child) {
return function (done) {
child.execute(done);
}
}
};