We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d529af4 commit 0a5a338Copy full SHA for 0a5a338
packages/react-reconciler/src/ReactFiber.js
@@ -41,10 +41,12 @@ if (__DEV__) {
41
var hasBadMapPolyfill = false;
42
try {
43
var nonExtensibleObject = Object.preventExtensions({});
44
- /* eslint-disable no-new */
45
- new Map([[nonExtensibleObject, null]]);
46
- new Set([nonExtensibleObject]);
47
- /* eslint-enable no-new */
+ var testMap = new Map([[nonExtensibleObject, null]]);
+ var testSet = new Set([nonExtensibleObject]);
+ // This is necessary for Rollup to not consider these unused.
+ // TODO: report this as a Rollup bug.
48
+ testMap.set(0, 0);
49
+ testSet.add(0);
50
} catch (e) {
51
// TODO: Consider warning about bad polyfills
52
hasBadMapPolyfill = true;
0 commit comments