fcl-js: jswriter: if-else: use bfalse position

git-svn-id: trunk@37240 -
This commit is contained in:
Mattias Gaertner 2017-09-17 20:33:02 +00:00
parent 8a9ddd8eb4
commit 6791127952

View File

@ -1100,9 +1100,9 @@ begin
Writeln('}'); Writeln('}');
end; end;
end; end;
Writer.CurElement:=El;
if HasBFalse then if HasBFalse then
begin begin
Writer.CurElement:=El.BFalse;
if not HasBTrue then if not HasBTrue then
begin begin
if C then if C then
@ -1114,7 +1114,9 @@ begin
Write(' '); Write(' ');
Write('else '); Write('else ');
WriteJS(El.BFalse) WriteJS(El.BFalse)
end; end
else
Writer.CurElement:=El;
end; end;
procedure TJSWriter.WriteForInStatement(El: TJSForInStatement); procedure TJSWriter.WriteForInStatement(El: TJSForInStatement);