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

Commit 5c735eb

Browse files
mheveryjbdeboer
authored andcommitted
fix(mock): prevent NPE when module definition outside of it.
1 parent 364e597 commit 5c735eb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/ngMock/angular-mocks.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1782,7 +1782,7 @@ window.jstestdriver && (function(window) {
17821782
try {
17831783
injector.invoke(blockFns[i] || angular.noop, this);
17841784
} catch (e) {
1785-
if(e.stack) e.stack += '\n' + errorForStack.stack;
1785+
if(e.stack && errorForStack) e.stack += '\n' + errorForStack.stack;
17861786
throw e;
17871787
} finally {
17881788
errorForStack = null;

0 commit comments

Comments
 (0)