[
https://issues.apache.org/jira/browse/THRIFT-4132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15940489#comment-15940489
]
Martin Hejnfelt commented on THRIFT-4132:
-----------------------------------------
Forgot to mention that this seem to only affect methods that can throw an
exception.
> Generated JavaScript code is missing a undefined check
> ------------------------------------------------------
>
> Key: THRIFT-4132
> URL: https://issues.apache.org/jira/browse/THRIFT-4132
> Project: Thrift
> Issue Type: Bug
> Components: JSON - Compiler
> Affects Versions: 0.10.0
> Environment: All
> Reporter: Martin Hejnfelt
>
> The generated code of a *_result object can take an "args" argument to its
> "constructor". However, at least when using WebSocket, the *_result object is
> not passed an "args" parameter, hence args is undefined. However the code
> still makes an instanceof test on args, causing an exception to be thrown at
> least on newer browsers (Tested on Chrome 57 and Firefox 52). Adding an "args
> !== undefined &&" in front of this, makes everything work nicely again.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)