Skip to content

Commit 4acd75b

Browse files
mheveryIgorMinar
authored andcommitted
fix(mock): prevent NPE when module definition outside of it.
1 parent cd6dd22 commit 4acd75b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ngMock/angular-mocks.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1753,7 +1753,7 @@ window.jasmine && (function(window) {
17531753
try {
17541754
injector.invoke(blockFns[i] || angular.noop, this);
17551755
} catch (e) {
1756-
if(e.stack) e.stack += '\n' + errorForStack.stack;
1756+
if(e.stack && errorForStack) e.stack += '\n' + errorForStack.stack;
17571757
throw e;
17581758
} finally {
17591759
errorForStack = null;

0 commit comments

Comments
 (0)