fix(mock): prevent NPE when module definition outside of it.

This commit is contained in:
Misko Hevery
2013-03-08 22:06:38 -08:00
committed by James deBoer
parent 364e597499
commit 5c735eb4ab

View File

@@ -1782,7 +1782,7 @@ window.jstestdriver && (function(window) {
try {
injector.invoke(blockFns[i] || angular.noop, this);
} catch (e) {
if(e.stack) e.stack += '\n' + errorForStack.stack;
if(e.stack && errorForStack) e.stack += '\n' + errorForStack.stack;
throw e;
} finally {
errorForStack = null;