Browse Source

fcl-js: fixed compile with pas2js

mattias 3 years ago
parent
commit
925dc4bc75
1 changed files with 2 additions and 2 deletions
  1. 2 2
      packages/fcl-js/src/jstree.pp

+ 2 - 2
packages/fcl-js/src/jstree.pp

@@ -3543,7 +3543,7 @@ end;
 
 { TJSFunction }
 
-destructor TJSFunctionDeclarationStatement.Destroy;
+destructor TJSFunctionStatement.Destroy;
 begin
   FreeAndNil(FFuncDef);
   inherited Destroy;
@@ -3607,7 +3607,7 @@ Var
 begin
   FParams.Clear;
   For I:=0 to TypedParams.Count-1 do
-    FParams.Add(UTF8Encode(TypedParams.Names[i]));
+    FParams.Add({$ifdef FPC_HAS_CPSTRING}UTF8Encode(TypedParams.Names[i]){$ELSE}TypedParams.Names[i]{$ENDIF});
 end;
 
 { TJSBracketMemberExpression }