Skip to content

Commit

Permalink
Prevent mangling of variables.
Browse files Browse the repository at this point in the history
Agoric#60
Use minimized UMD in demo.
  • Loading branch information
jfparadis committed Oct 1, 2019
1 parent 357beba commit a185aa7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/simple.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<html>
<header>
<script src="../dist/realms-shim.umd.js"></script>
<script src="../dist/realms-shim.umd.min.js"></script>
</header>
<body>
<h1>Realm Shim</h1>
Expand Down
3 changes: 1 addition & 2 deletions src/repair/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
*/

// todo: this file should be moved out to a separate repo and npm module.
const globalEval = eval;
export function repairFunctions() {
const { defineProperties, getPrototypeOf, setPrototypeOf } = Object;

Expand All @@ -35,7 +34,7 @@ export function repairFunctions() {
let FunctionInstance;
try {
// eslint-disable-next-line no-new-func
FunctionInstance = globalEval(declaration);
FunctionInstance = (0, eval)(declaration);
} catch (e) {
if (e instanceof SyntaxError) {
// Prevent failure on platforms where async and/or generators
Expand Down

0 comments on commit a185aa7

Please sign in to comment.