nodejs: fixed GetEnvironmentVariable on non existing vars

This commit is contained in:
mattias 2019-04-11 10:52:39 +00:00
parent 2e7fc52370
commit a01249f56d

View File

@ -63,8 +63,14 @@ begin
end;
function MyGetEnvironmentVariable(Const EnvVar: String): String;
var
v: JSValue;
begin
Result:=String(TNJSProcess.env[EnvVar]);
v:=TNJSProcess.env[EnvVar];
if isString(v) then
Result:=String(v)
else
Result:='';
end;
function MyGetEnvironmentVariableCount: Integer;