File tree Expand file tree Collapse file tree 2 files changed +8
-14
lines changed Expand file tree Collapse file tree 2 files changed +8
-14
lines changed Original file line number Diff line number Diff line change @@ -101,13 +101,10 @@ if (__DEV__) {
101101 hasBadMapPolyfill = false ;
102102 try {
103103 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 */
111108 } catch ( e ) {
112109 // TODO: Consider warning about bad polyfills
113110 hasBadMapPolyfill = true ;
Original file line number Diff line number Diff line change @@ -12,13 +12,10 @@ if (__DEV__) {
1212 hasBadMapPolyfill = false ;
1313 try {
1414 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 */
2219 } catch ( e ) {
2320 // TODO: Consider warning about bad polyfills
2421 hasBadMapPolyfill = true ;
You can’t perform that action at this time.
0 commit comments