From 1ad6d6beb85801bf3944a177ead3d87cf3a19d18 Mon Sep 17 00:00:00 2001 From: ramiloif Date: Fri, 31 Jan 2020 03:14:38 +0200 Subject: [PATCH] Bind eval to an empty scope to avoid crashes When typing a variable that exists in current eval tha app will crash because It will not exist in the "real" eval --- src/selectors/parse_expressions.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/selectors/parse_expressions.js b/src/selectors/parse_expressions.js index 404c0b11..b3fd1d73 100644 --- a/src/selectors/parse_expressions.js +++ b/src/selectors/parse_expressions.js @@ -55,8 +55,8 @@ const parseExpressions = (code) => { return expressions; }, {}); - - eval(transformedCode); + const evalNoScope = eval.bind(); + evalNoScope(transformedCode); return exp; }