From 0c8f00d24af923686f0d8b6377831f9dca696aeb Mon Sep 17 00:00:00 2001 From: Andrey Sobolev Date: Tue, 27 Feb 2024 17:31:19 +0700 Subject: [PATCH] UBERF-5744: Fix exception on server (#4787) Signed-off-by: Andrey Sobolev --- packages/query/src/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/query/src/index.ts b/packages/query/src/index.ts index 00b45037d2..1260b35dce 100644 --- a/packages/query/src/index.ts +++ b/packages/query/src/index.ts @@ -463,6 +463,9 @@ export class LiveQuery implements WithTx, Client { } return toFindResult(this.clone(q.result), q.total) as FindResult } + if (current.result instanceof Promise) { + current.result = await current.result + } return toFindResult(this.clone((current?.result as T[]) ?? []), current.total) }