Skip to content

Correctly handle null values when executed with a callback #53

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 25, 2017
Merged

Correctly handle null values when executed with a callback #53

merged 1 commit into from
May 25, 2017

Conversation

sstone1
Copy link
Contributor

@sstone1 sstone1 commented May 25, 2017

The following error occurs when jsonata is invoked with a callback and an expression that returns a null value:

TypeError: Cannot read property 'then' of null
      at evaluate (jsonata.js:1377:58)
      at next (native)
      at evaluateStep (jsonata.js:1476:31)
      at next (native)
      at evaluatePath (jsonata.js:1429:38)
      at next (native)
      at evaluate (jsonata.js:1323:34)
      at next (native)
      at Object.evaluate (jsonata.js:4117:33)
      at test/async-function.js:20:14
      at jsonataPromise (test/async-function.js:19:12)
      at Context.<anonymous> (test/async-function.js:95:23)

@coveralls
Copy link

coveralls commented May 25, 2017

Coverage Status

Coverage remained the same at 100.0% when pulling 7ae8782 on sstone1:async-error-on-null into 502c2e3 on jsonata-js:master.

@andrew-coleman
Copy link
Member

andrew-coleman commented May 25, 2017

Thank you!

@andrew-coleman andrew-coleman merged commit fa9d00c into jsonata-js:master May 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants