Merge branch 'sgravrock-global-errors-rethrow'

- Merges #1347 from @sgravrock
This commit is contained in:
Gregg Van Hove
2017-05-08 14:14:55 -07:00
3 changed files with 28 additions and 2 deletions

View File

@@ -2168,7 +2168,12 @@ getJasmineRequireObj().GlobalErrors = function(j$) {
var onerror = function onerror() {
var handler = handlers[handlers.length - 1];
handler.apply(null, Array.prototype.slice.call(arguments, 0));
if (handler) {
handler.apply(null, Array.prototype.slice.call(arguments, 0));
} else {
throw arguments[0];
}
};
this.uninstall = function noop() {};