You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've noticed by accident that JSONata mutates the variable passed to the evaluate method call, if evaluation fails due to an error associated with that variable, here's the reproduction branch: #589
it("should not mutate bound variable on failure",function(){varexpr=jsonata("$myVariable()");varmyVariable={"foo": "bar"};try{expr.evaluate(testdata2,{ myVariable });}catch(e){// ignore the evaluation error}expect(myVariable).to.deep.equal({"foo": "bar"});});
vitorbal, bahrmichael, ZackKanter, rsioss and tommy