Browse Source

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

git-svn-id: trunk@37240 -
Mattias Gaertner 8 years ago
parent
commit
6791127952
1 changed files with 4 additions and 2 deletions
  1. 4 2
      packages/fcl-js/src/jswriter.pp

+ 4 - 2
packages/fcl-js/src/jswriter.pp

@@ -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);