mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-13 03:40:48 +00:00
Clear LQ results when refresh connect (#5101)
This commit is contained in:
parent
693f3741f3
commit
75a3d845dd
@ -127,6 +127,9 @@ export class LiveQuery implements WithTx, Client {
|
||||
for (const q of [...this.queue]) {
|
||||
if (!this.removeFromQueue(q)) {
|
||||
try {
|
||||
q.callbacks.forEach((callback) => {
|
||||
callback(toFindResult([], 0))
|
||||
})
|
||||
void this.refresh(q)
|
||||
} catch (err: any) {
|
||||
if (err instanceof PlatformError) {
|
||||
@ -141,6 +144,9 @@ export class LiveQuery implements WithTx, Client {
|
||||
for (const v of this.queries.values()) {
|
||||
for (const q of v) {
|
||||
try {
|
||||
q.callbacks.forEach((callback) => {
|
||||
callback(toFindResult([], 0))
|
||||
})
|
||||
void this.refresh(q)
|
||||
} catch (err: any) {
|
||||
if (err instanceof PlatformError) {
|
||||
|
Loading…
Reference in New Issue
Block a user