From d497f63429450e896f3e9043073e9c57b25ded46 Mon Sep 17 00:00:00 2001 From: mattias Date: Sat, 7 Nov 2020 11:05:09 +0000 Subject: [PATCH] pastojs: fixed shortrefglobals for proc without args, issue 38043 --- compiler/packages/pastojs/src/fppas2js.pp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compiler/packages/pastojs/src/fppas2js.pp b/compiler/packages/pastojs/src/fppas2js.pp index 22f2d2c..09f7eac 100644 --- a/compiler/packages/pastojs/src/fppas2js.pp +++ b/compiler/packages/pastojs/src/fppas2js.pp @@ -9828,6 +9828,8 @@ var CreateProcedureCall(Call,nil,ProcType,AContext); if ApplyParam<>nil then begin + if Call.Args=nil then + Call.Args:=TJSArguments(CreateElement(TJSArguments,ProcType)); Call.InsertArg(0,ApplyParam); ApplyParam:=nil; if AContext is TDotContext then