forked from mobxjs/mobx
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't try/catch errors when globalstate.disableErrorBoundaries is on.
Fixes mobxjs#1241
- Loading branch information
Showing
5 changed files
with
68 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -98,7 +98,9 @@ import { | |
resetGlobalState, | ||
shareGlobalState, | ||
getGlobalState, | ||
isolateGlobalState | ||
isolateGlobalState, | ||
disableErrorBoundaries, | ||
enableErrorBoundaries | ||
} from "./core/globalstate" | ||
import { IDerivation } from "./core/derivation" | ||
import { IDepTreeNode } from "./core/observable" | ||
|
@@ -139,7 +141,9 @@ export const extras = { | |
spyReport, | ||
spyReportEnd, | ||
spyReportStart, | ||
setReactionScheduler | ||
setReactionScheduler, | ||
disableErrorBoundaries, | ||
enableErrorBoundaries, | ||
} | ||
|
||
// Deprecated default export (will be removed in 4.0) | ||
|
@@ -260,8 +264,8 @@ for (let p in everything) { | |
warnedAboutDefaultExport = true | ||
console.warn( | ||
"Using default export (`import mobx from 'mobx'`) is deprecated " + | ||
"and won’t work in [email protected]\n" + | ||
"Use `import * as mobx from 'mobx'` instead" | ||
"and won’t work in [email protected]\n" + | ||
"Use `import * as mobx from 'mobx'` instead" | ||
) | ||
} | ||
return val | ||
|