Browse Source

pastojs: fixed shortrefglobals for proc without args, issue #38043

git-svn-id: trunk@47335 -
Mattias Gaertner 4 years ago
parent
commit
a2af4429f9
1 changed files with 2 additions and 0 deletions
  1. 2 0
      packages/pastojs/src/fppas2js.pp

+ 2 - 0
packages/pastojs/src/fppas2js.pp

@@ -9828,6 +9828,8 @@ var
       CreateProcedureCall(Call,nil,ProcType,AContext);
       CreateProcedureCall(Call,nil,ProcType,AContext);
       if ApplyParam<>nil then
       if ApplyParam<>nil then
         begin
         begin
+        if Call.Args=nil then
+          Call.Args:=TJSArguments(CreateElement(TJSArguments,ProcType));
         Call.InsertArg(0,ApplyParam);
         Call.InsertArg(0,ApplyParam);
         ApplyParam:=nil;
         ApplyParam:=nil;
         if AContext is TDotContext then
         if AContext is TDotContext then