File tree Expand file tree Collapse file tree 1 file changed +5
-18
lines changed Expand file tree Collapse file tree 1 file changed +5
-18
lines changed Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
3
- // Duplicated from 'react/packages/shared/ExecutionEnvironment.js'
4
- var canUseDom = ! ! (
5
- typeof window !== 'undefined' &&
6
- typeof window . document !== 'undefined' &&
7
- typeof window . document . createElement !== 'undefined'
8
- ) ;
9
-
10
- // Checks if this is global space
11
- // eslint-disable-next-line no-undef
12
- var isThisGlobal = ! ! ( typeof globalThis !== 'undefined' && globalThis === this ) ;
13
-
14
- if ( canUseDom && isThisGlobal ) {
15
- if ( process . env . NODE_ENV === 'production' ) {
16
- module . exports = require ( './cjs/scheduler.production.min.js' ) ;
17
- } else {
18
- module . exports = require ( './cjs/scheduler.development.js' ) ;
19
- }
20
- } else {
3
+ if ( typeof window === 'undefined' || typeof MessageChannel !== 'function' ) {
21
4
module . exports = require ( './unstable_no_dom' ) ;
5
+ } else if ( process . env . NODE_ENV === 'production' ) {
6
+ module . exports = require ( './cjs/scheduler.production.min.js' ) ;
7
+ } else {
8
+ module . exports = require ( './cjs/scheduler.development.js' ) ;
22
9
}
You can’t perform that action at this time.
0 commit comments