1 | import ReactUpdates from "react-dom/lib/ReactUpdates"
|
2 | import ReactDefaultBatchingStrategy from "react-dom/lib/ReactDefaultBatchingStrategy"
|
3 | import utils from 'edf-utils'
|
4 |
|
5 | let isHandlingError = false
|
6 |
|
7 | const ReactTryCatchBatchingStrategy = {
|
8 | get isBatchingUpdates() {
|
9 | return ReactDefaultBatchingStrategy.isBatchingUpdates
|
10 | },
|
11 |
|
12 | batchedUpdates(...args) {
|
13 | try {
|
14 | ReactDefaultBatchingStrategy.batchedUpdates(...args)
|
15 | } catch (e) {
|
16 | utils.exception.error(e)
|
17 | }
|
18 | },
|
19 | }
|
20 |
|
21 | ReactUpdates.injection.injectBatchingStrategy(ReactTryCatchBatchingStrategy) |
\ | No newline at end of file |