Skip to content

Commit

Permalink
fix: LazyQueryResult.Js_.classify was checking the wrong value
Browse files Browse the repository at this point in the history
resolves #161
  • Loading branch information
illusionalsagacity committed Oct 20, 2024
1 parent bdff923 commit e871515
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,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 e871515

Please sign in to comment.