Instead of using eval to get things out of the Math object, we can use aset. Solution from David at Hack and Tell. Thanks!
1 files changed, 2 insertions(+), 2 deletions(-) M src/cljs/calculator/calculator.cljs
M src/cljs/calculator/calculator.cljs +2 -2
@@ 143,8 143,8 @@ (operator->function lower-operator) (when (or (.hasOwnProperty js/Math upper-operator) (.hasOwnProperty js/Math lower-operator)) - (let [function-or-constant (or (js/eval (str "Math." upper-operator)) - (js/eval (str "Math." lower-operator)))] + (let [function-or-constant (or (aget js/Math upper-operator) + (aget js/Math lower-operator))] (cond (number? function-or-constant) (constant-operation function-or-constant) (fn? function-or-constant)