Skip to content

jsonata expression evaluation is async, so needs to be awaited#11

Merged
Alkarex merged 2 commits intoalexandrainst:masterfrom
jamiepenney:patch-1
Feb 8, 2023
Merged

jsonata expression evaluation is async, so needs to be awaited#11
Alkarex merged 2 commits intoalexandrainst:masterfrom
jamiepenney:patch-1

Conversation

@jamiepenney
Copy link
Copy Markdown
Contributor

https://github.com/jsonata-js/jsonata/blob/master/CHANGELOG.md#200-major-release

It looks like version 2.0 of the jsonata package changed expression.evaluate to return a promise, so the match object was never matching an actual case from cases. You can see the change they made in their quick start docs here: https://github.com/jsonata-js/jsonata#quick-start

I haven't checked the rest of this codebase for any other problems like this, as I am only using the resolver with JSOnata and validator nodes with JSON Schema.

@Alkarex Alkarex merged commit 1484b85 into alexandrainst:master Feb 8, 2023
@Alkarex
Copy link
Copy Markdown
Member

Alkarex commented Feb 8, 2023

Thanks for the bug report and PR 👍🏻

@Alkarex
Copy link
Copy Markdown
Member

Alkarex commented Feb 8, 2023

@jamiepenney New version published. Could you please give it a try?
https://flows.nodered.org/node/node-red-contrib-json-multi-schema

@jamiepenney
Copy link
Copy Markdown
Contributor Author

Works perfectly, thanks!

@jamiepenney jamiepenney deleted the patch-1 branch February 8, 2023 09:43
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.

2 participants