fulcrumapp / fulcrum-expressions

Fulcrum expressions engine
http://developer.fulcrumapp.com/expressions/intro/
5 stars 0 forks source link

Task/flcrm 8530 add apply field effects #49

Closed jahndis closed 2 years ago

jahndis commented 2 years ago

The version of expressions-proxy.coffee in this PR will produce exactly what's deployed in S3 if built in fulcrum-expressions-sandbox. This repo has a different version of browserify which showed a larger diff, but in my testing, the differences don't appear to affect anything. The only missing thing from the original expressions-proxy.coffee was a try/catch:

diff --git a/expressions-proxy.s3.formatted.js b/expressions-proxy.sandbox.formatted.js
index b310c05..fe4116f 100644
--- a/expressions-proxy.s3.formatted.js
+++ b/expressions-proxy.sandbox.formatted.js
@@ -39,10 +39,7 @@ e.prototype.onMessage=function(e){
 var r;
 this.source=e.source;
 this.origin=e.origin;
-try{
-r=JSON.parse(e.data)}
-catch(e){
-return}
+r=JSON.parse(e.data);
 this.id=r.id;
 return this[r.name](e,r)}
 ;

Once the try catch was added, the output was the same.

To test: