Browse Source

fcl-js: fixed hashlist for pas2js

git-svn-id: trunk@40135 -
Mattias Gaertner 6 years ago
parent
commit
b5e7566e55
1 changed files with 3 additions and 3 deletions
  1. 3 3
      packages/fcl-js/src/jssrcmap.pas

+ 3 - 3
packages/fcl-js/src/jssrcmap.pas

@@ -474,7 +474,7 @@ end;
 procedure TSourceMap.TStringToIndex.Add(const Value: String; Index: integer);
 begin
   {$ifdef pas2js}
-  FItems[Value]:=Index;
+  FItems['%'+Value]:=Index;
   {$else}
   // Note: nil=0 means not found in TFPHashList
   FItems.Add(Value,{%H-}Pointer(PtrInt(Index+1)));
@@ -485,8 +485,8 @@ function TSourceMap.TStringToIndex.FindValue(const Value: String
   ): integer;
 begin
   {$ifdef pas2js}
-  if FItems.hasOwnProperty(Value) then
-    Result:=integer(FItems[Value])
+  if FItems.hasOwnProperty('%'+Value) then
+    Result:=integer(FItems['%'+Value])
   else
     Result:=-1;
   {$else}