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:
Philip Chimento
2015-01-19 22:28:58 -08:00
parent e5feba994f
commit 5eaf7152bf
2 changed files with 3 additions and 2 deletions

View File

@@ -34,7 +34,8 @@ getJasmineRequireObj().QueueRunner = function(j$) {
for(iterativeIndex = recursiveIndex; iterativeIndex < length; iterativeIndex++) {
var queueableFn = queueableFns[iterativeIndex];
if (queueableFn.fn.length > 0) {
return attemptAsync(queueableFn);
attemptAsync(queueableFn);
return;
} else {
attemptSync(queueableFn);
}