Skip to content

Commit 29b5830

Browse files
committed
Prevent reentrant isSetup when used in log method
Calling isSetup from within a log method before Raven is setup can cause Raven to enter an reentrant flow. Set the `raventNotConfiguredError` flag early to limit reentrances to 1.
1 parent 62403b7 commit 29b5830

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/raven.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -485,9 +485,10 @@ Raven.prototype = {
485485
isSetup: function() {
486486
if (!this._hasJSON) return false; // needs JSON support
487487
if (!this._globalServer) {
488-
if (!this.ravenNotConfiguredError)
488+
if (!this.ravenNotConfiguredError) {
489+
this.ravenNotConfiguredError = true;
489490
this._logDebug('error', 'Error: Raven has not been configured.');
490-
this.ravenNotConfiguredError = true;
491+
}
491492
return false;
492493
}
493494
return true;

0 commit comments

Comments
 (0)