File tree 2 files changed +8
-14
lines changed 2 files changed +8
-14
lines changed Original file line number Diff line number Diff line change @@ -101,13 +101,10 @@ if (__DEV__) {
101
101
hasBadMapPolyfill = false ;
102
102
try {
103
103
const nonExtensibleObject = Object . preventExtensions ( { } ) ;
104
- const testMap = new Map ( [ [ nonExtensibleObject , null ] ] ) ;
105
- const testSet = new Set ( [ nonExtensibleObject ] ) ;
106
- // This is necessary for Rollup to not consider these unused.
107
- // https://github.com/rollup/rollup/issues/1771
108
- // TODO: we can remove these if Rollup fixes the bug.
109
- testMap . set ( 0 , 0 ) ;
110
- testSet . add ( 0 ) ;
104
+ /* eslint-disable no-new */
105
+ new Map ( [ [ nonExtensibleObject , null ] ] ) ;
106
+ new Set ( [ nonExtensibleObject ] ) ;
107
+ /* eslint-enable no-new */
111
108
} catch ( e ) {
112
109
// TODO: Consider warning about bad polyfills
113
110
hasBadMapPolyfill = true ;
Original file line number Diff line number Diff line change @@ -12,13 +12,10 @@ if (__DEV__) {
12
12
hasBadMapPolyfill = false ;
13
13
try {
14
14
const frozenObject = Object . freeze ( { } ) ;
15
- const testMap = new Map ( [ [ frozenObject , null ] ] ) ;
16
- const testSet = new Set ( [ frozenObject ] ) ;
17
- // This is necessary for Rollup to not consider these unused.
18
- // https://github.com/rollup/rollup/issues/1771
19
- // TODO: we can remove these if Rollup fixes the bug.
20
- testMap . set ( 0 , 0 ) ;
21
- testSet . add ( 0 ) ;
15
+ /* eslint-disable no-new */
16
+ new Map ( [ [ frozenObject , null ] ] ) ;
17
+ new Set ( [ frozenObject ] ) ;
18
+ /* eslint-enable no-new */
22
19
} catch ( e ) {
23
20
// TODO: Consider warning about bad polyfills
24
21
hasBadMapPolyfill = true ;
You can’t perform that action at this time.
0 commit comments