Merge branch '3.99.1' into 4.0.1
This commit is contained in:
@@ -177,7 +177,10 @@ getJasmineRequireObj().QueueRunner = function(j$) {
|
||||
maybeThenable = queueableFn.fn.call(self.userContext);
|
||||
|
||||
if (maybeThenable && j$.isFunction_(maybeThenable.then)) {
|
||||
maybeThenable.then(next, onPromiseRejection);
|
||||
maybeThenable.then(
|
||||
wrapInPromiseResolutionHandler(next),
|
||||
onPromiseRejection
|
||||
);
|
||||
completedSynchronously = false;
|
||||
return { completedSynchronously: false };
|
||||
}
|
||||
@@ -276,5 +279,15 @@ getJasmineRequireObj().QueueRunner = function(j$) {
|
||||
}
|
||||
};
|
||||
|
||||
function wrapInPromiseResolutionHandler(fn) {
|
||||
return function(maybeArg) {
|
||||
if (j$.isError_(maybeArg)) {
|
||||
fn(maybeArg);
|
||||
} else {
|
||||
fn();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
return QueueRunner;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user