mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-01-12 22:45:52 +08:00
fix(mock): prevent NPE when module definition outside of it.
This commit is contained in:
committed by
James deBoer
parent
364e597499
commit
5c735eb4ab
2
src/ngMock/angular-mocks.js
vendored
2
src/ngMock/angular-mocks.js
vendored
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user