From c0cd95f00a27aa6dd6f64b14f9f50d10901742dc Mon Sep 17 00:00:00 2001 From: Zubair Quraishi Date: Fri, 20 Oct 2023 17:04:44 +0200 Subject: [PATCH] Creating app method container wrapper --- src/runtimePipelineYazzUiMethods.js | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/runtimePipelineYazzUiMethods.js b/src/runtimePipelineYazzUiMethods.js index 8744bca70..f92f11e61 100644 --- a/src/runtimePipelineYazzUiMethods.js +++ b/src/runtimePipelineYazzUiMethods.js @@ -1609,11 +1609,7 @@ ${formprop.fn} } } debugger - if (isAsync) { - return mm.convertAppMethodStringToFn( appMethodId , true) - } else { - return mm.convertAppMethodStringToFn( appMethodId , false) - } + return mm.convertAppMethodStringToFn( appMethodId , isAsync) }, convertAppMethodStringToFn: function ( appMethodId , isAsync ) { let mm = this @@ -1628,8 +1624,15 @@ ${methodSrcCode} { skipFirstAndLastLine: true }) + let containingCode = +`(${isAsync?"async ":""}function(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10) { +let innerf= ${debugFcc} +let retv = innerf(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10) +return retv +}) +` - fnDetails = eval(debugFcc) + fnDetails = eval(containingCode) return fnDetails }, deleteCursor: function ( ) {