Skip to content

Commit

Permalink
Merge pull request #162 from illusionalsagacity/fix-lazy-query-classify
Browse files Browse the repository at this point in the history
fix: LazyQueryResult.Js_.classify was checking the wrong value
  • Loading branch information
jeddeloh authored Oct 20, 2024
2 parents 611f6d0 + e871515 commit fbf33cb
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ module LazyQueryResult = {
| UnexecutedLazyResult(UnexecutedLazyResult.Js_.t)
| QueryResult(QueryResult.Js_.t<'jsData, 'jsVariables>)
let classify = (Any(v): t): case<'jsData, 'jsVariables> =>
if %raw(`function (value) { return "client" in value}`)(v) {
if %raw(`function (value) { return "called" in value && value.called === true; }`)(v) {
QueryResult((Obj.magic(v): QueryResult.Js_.t<'jsData, 'jsVariables>))
} else {
UnexecutedLazyResult((Obj.magic(v): UnexecutedLazyResult.Js_.t))
Expand Down

0 comments on commit fbf33cb

Please sign in to comment.