Skip to content

Commit

Permalink
Remove "const" in uncompiled code (#10631)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
sophiebits authored Sep 7, 2017
1 parent d8ecc4c commit 16a39b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/react/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ function testMinificationUsedDCE() {
try {
// use scoped variable for our initial test, in case
// 'top-level' mangling is not enabled.
const source = testMinificationUsedDCE.toString();
const longVariableName = true;
var source = testMinificationUsedDCE.toString();
var longVariableName = true;
if (longVariableName && source.match(/longVariableName/g).length === 3) {
// We are not minified.
// This might be a Node environment where DCE is not expected anyway.
Expand Down

0 comments on commit 16a39b8

Please sign in to comment.