Skip to content

Commit 16a39b8

Browse files
authored
Remove "const" in uncompiled code (facebook#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.
1 parent d8ecc4c commit 16a39b8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/react/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ function testMinificationUsedDCE() {
88
try {
99
// use scoped variable for our initial test, in case
1010
// 'top-level' mangling is not enabled.
11-
const source = testMinificationUsedDCE.toString();
12-
const longVariableName = true;
11+
var source = testMinificationUsedDCE.toString();
12+
var longVariableName = true;
1313
if (longVariableName && source.match(/longVariableName/g).length === 3) {
1414
// We are not minified.
1515
// This might be a Node environment where DCE is not expected anyway.

0 commit comments

Comments
 (0)