[Pas2js] ISSUE: [Error] hotreloadclient.pas(252): Incompatible types: got "JSValue" expected "TJSObject"

Frameworks developer.frameworks at gmail.com
Thu Jul 26 17:23:05 CEST 2018


Pas2js / WEB Core Teams:

Presently, when compiling an application using the WEB Core v1.0.0.0
framework on Delphi Enterprise v10.2.3, WEB Core's included Pas2js compiler
(v0.9.32+beta) raises the above error at line 252 of hotreloadclient.pas.

We can, however, get the unit to compile successfully by coercing the
JSValue returned by TJSJSON.parse to TJSObject using toObject as
follows...


Change:
    Data:=TJSJSON.parse(FLastReq.responseText);
to:
    Data:=toObject( TJSJSON.parse(FLastReq.responseText) );


Please confirm this is the appropriate fix.

Appreciatively,

J Ralston
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/pas2js/attachments/20180726/e74e9662/attachment.html>


More information about the Pas2js mailing list