mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-13 19:58:09 +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]) {
|
for (const q of [...this.queue]) {
|
||||||
if (!this.removeFromQueue(q)) {
|
if (!this.removeFromQueue(q)) {
|
||||||
try {
|
try {
|
||||||
|
q.callbacks.forEach((callback) => {
|
||||||
|
callback(toFindResult([], 0))
|
||||||
|
})
|
||||||
void this.refresh(q)
|
void this.refresh(q)
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
if (err instanceof PlatformError) {
|
if (err instanceof PlatformError) {
|
||||||
@ -141,6 +144,9 @@ export class LiveQuery implements WithTx, Client {
|
|||||||
for (const v of this.queries.values()) {
|
for (const v of this.queries.values()) {
|
||||||
for (const q of v) {
|
for (const q of v) {
|
||||||
try {
|
try {
|
||||||
|
q.callbacks.forEach((callback) => {
|
||||||
|
callback(toFindResult([], 0))
|
||||||
|
})
|
||||||
void this.refresh(q)
|
void this.refresh(q)
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
if (err instanceof PlatformError) {
|
if (err instanceof PlatformError) {
|
||||||
|
Loading…
Reference in New Issue
Block a user