Skip to content

Commit

Permalink
fix: hot fixing ES5 literals in index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
theKashey committed Sep 20, 2018
1 parent 0d0d164 commit 80f6b63
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
'use strict'

let evalAllowed = false;
var evalAllowed = false;
try {
eval('evalAllowed = true');
} catch (e) {
// eval not allowed due to CSP
}

// RHL needs setPrototypeOf to operate Component inheritance, and eval to patch methods
const platformSupported = !!Object.setPrototypeOf && evalAllowed;
var platformSupported = !!Object.setPrototypeOf && evalAllowed;

if (!module.hot || process.env.NODE_ENV === 'production' || !platformSupported) {
if (module.hot) {
Expand Down

0 comments on commit 80f6b63

Please sign in to comment.