pas2js: fixed uninitialized var, serviceworker targetos nodejs

This commit is contained in:
mattias 2022-05-12 12:34:49 +02:00
parent 80da9bee92
commit e7f787f78d
3 changed files with 3 additions and 7 deletions

View File

@ -387,6 +387,7 @@ begin
if WebDir='' then
exit(mrCancel);
SWSLocation:=nil;
if Location<>'' then
begin
Location:=GetProjectLocation(aProject);
@ -414,6 +415,7 @@ begin
debugln(['Info: TPJSController.RunProject missing htmlfile']);
exit(mrCancel);
end;
if SWSLocation<>nil then
begin
if not SimpleWebServerController.OpenBrowserWithLocation(SWSLocation,HTMLFilename) then

View File

@ -840,7 +840,7 @@ begin
AProject.AddFile(MainFile,false);
AProject.MainFileID:=0;
CompOpts:=AProject.LazCompilerOptions;
SetDefaultServiceWorkerCompileOptions(CompOpts);
SetDefaultNodeJSCompileOptions(CompOpts);
CompOpts.TargetFilename:=ExtractFileNameOnly(LPRFilename);
SetDefaultServiceWorkerRunParams(AProject.RunParameters.GetOrCreate('Default'));
AProject.MainFile.SetSourceText(CreateProjectSource,true);

View File

@ -63,7 +63,6 @@ Procedure SetDefaultWebRunParams(RunParams : TAbstractRunParamsOptionsMode);
Procedure SetDefaultServiceWorkerRunParams(RunParams : TAbstractRunParamsOptionsMode);
Procedure SetDefaultNodeRunParams(RunParams : TAbstractRunParamsOptionsMode);
Procedure SetDefaultWebCompileOptions(CompOpts: TLazCompilerOptions);
Procedure SetDefaultServiceWorkerCompileOptions(CompOpts: TLazCompilerOptions);
Procedure SetDefaultNodeJSCompileOptions(CompOpts: TLazCompilerOptions);
Procedure SetDefaultModuleCompileOptions(CompOpts: TLazCompilerOptions);
@ -143,11 +142,6 @@ begin
SetPasJSCompileOptions(CompOpts,'browser','-Jeutf-8 -Jirtl.js -Jc -Jminclude');
end;
procedure SetDefaultServiceWorkerCompileOptions(CompOpts: TLazCompilerOptions);
begin
SetPasJSCompileOptions(CompOpts,'browser','-Jeutf-8 -Jirtl.js -Jc -Jminclude');
end;
Procedure SetDefaultNodeJSCompileOptions(CompOpts: TLazCompilerOptions);
begin