Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Commit

Permalink
fix(mock): prevent NPE when module definition outside of it.
Browse files Browse the repository at this point in the history
  • Loading branch information
mhevery authored and jbdeboer committed Mar 27, 2013
1 parent 364e597 commit 5c735eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ngMock/angular-mocks.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5c735eb

Please sign in to comment.