Fix some SpiderMonkey lint
SpiderMonkey complains about functions not always returning a value. In most cases that is a conscious code style choice, so it is not fixed here. In one case (MockDate) the interpreter thought you could have fallen off the end of a "switch" statement, although the number of arguments prevented that. This was fixed by changing the last case to "default". In another case (QueueRunner) the function really did return a value sometimes and nothing other times, although as far as I could see, it could only ever return "undefined". The function now explicitly only returns no value. See #751
This commit is contained in:
@@ -54,7 +54,7 @@ getJasmineRequireObj().MockDate = function() {
|
|||||||
case 6:
|
case 6:
|
||||||
return new GlobalDate(arguments[0], arguments[1], arguments[2], arguments[3],
|
return new GlobalDate(arguments[0], arguments[1], arguments[2], arguments[3],
|
||||||
arguments[4], arguments[5]);
|
arguments[4], arguments[5]);
|
||||||
case 7:
|
default:
|
||||||
return new GlobalDate(arguments[0], arguments[1], arguments[2], arguments[3],
|
return new GlobalDate(arguments[0], arguments[1], arguments[2], arguments[3],
|
||||||
arguments[4], arguments[5], arguments[6]);
|
arguments[4], arguments[5], arguments[6]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,8 @@ getJasmineRequireObj().QueueRunner = function(j$) {
|
|||||||
for(iterativeIndex = recursiveIndex; iterativeIndex < length; iterativeIndex++) {
|
for(iterativeIndex = recursiveIndex; iterativeIndex < length; iterativeIndex++) {
|
||||||
var queueableFn = queueableFns[iterativeIndex];
|
var queueableFn = queueableFns[iterativeIndex];
|
||||||
if (queueableFn.fn.length > 0) {
|
if (queueableFn.fn.length > 0) {
|
||||||
return attemptAsync(queueableFn);
|
attemptAsync(queueableFn);
|
||||||
|
return;
|
||||||
} else {
|
} else {
|
||||||
attemptSync(queueableFn);
|
attemptSync(queueableFn);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user