Remove "const" in uncompiled code (#10631)
Test Plan: All fixtures/packaging iframes display correctly on Chrome 38.0.2125.0 from https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html?prefix=Mac/290001/; previously several were blank with "Use of const in strict mode" errors logged to the console.
Sophie Alpert committed
Sep 6, 2017 at 20:32 UTC
16a39b8f02f7db9df16b64e41d145bd4f0cb250a
1 file changed
+2
-2
packages/react/index.js
+2
-2
@@ -8,8 +8,8 @@ function testMinificationUsedDCE() {
8
try {
9
// use scoped variable for our initial test, in case
10
// 'top-level' mangling is not enabled.
11
- const source = testMinificationUsedDCE.toString();
12
- const longVariableName = true;
11
+ var source = testMinificationUsedDCE.toString();
12
+ var longVariableName = true;
13
if (longVariableName && source.match(/longVariableName/g).length === 3) {
14
// We are not minified.
15
// This might be a Node environment where DCE is not expected anyway.