@chamn/render 0.8.1 → 0.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -850,13 +850,16 @@ function qu(t) {
850
850
  return e.displayName = t.displayName, e;
851
851
  }
852
852
  const At = (t, e) => {
853
- const r = (n) => se({
854
- funcBody: `function run () { return ${n}; }`,
855
- funcName: "run",
856
- nodeContext: e.nodeContext,
857
- storeManager: e.storeManager,
858
- nodeModel: e.nodeModel
859
- })();
853
+ const r = (n) => {
854
+ let o = `function run () { return ${n}; }`;
855
+ return n.includes("return ") && (o = `function runExp () { ${n} }`), se({
856
+ funcBody: o,
857
+ funcName: "run",
858
+ nodeContext: e.nodeContext,
859
+ storeManager: e.storeManager,
860
+ nodeModel: e.nodeModel
861
+ })();
862
+ };
860
863
  try {
861
864
  return r(t);
862
865
  } catch (n) {
@@ -877,7 +880,7 @@ const At = (t, e) => {
877
880
  return {
878
881
  [c]: function(...d) {
879
882
  let l;
880
- const h = Object.keys(i || {}).map((g) => `var ${g} = $$ACTION_VAR_SPACE[${JSON.stringify(g)}];`);
883
+ const h = Object.keys(i || {}).map((g) => `var ${g} = $ACTION_VAR_SPACE[${JSON.stringify(g)}];`);
881
884
  try {
882
885
  return l = `
883
886
  var $$$__args__$$$ = Array.from(arguments);
@@ -925,7 +928,7 @@ ${bn("$U_STATE", {
925
928
  return $$_run_$$();
926
929
  `, new Function(l)(...d, { $$context: n, storeManager: o, $$response: a, actionVariableSpace: i, nodeModel: s });
927
930
  } catch (g) {
928
- console.log(l), console.warn(g);
931
+ console.warn(g);
929
932
  }
930
933
  }
931
934
  }[c];