Skip to content

Commit

Permalink
QFix: LastTx event check fix (#7598)
Browse files Browse the repository at this point in the history
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
  • Loading branch information
haiodo authored Jan 7, 2025
1 parent a2cbc2a commit 9c7ce99
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/core/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { MeasureContext, MeasureMetricsContext } from './measurements'
import { ModelDb } from './memdb'
import type { DocumentQuery, FindOptions, FindResult, FulltextStorage, Storage, TxResult, WithLookup } from './storage'
import { SearchOptions, SearchQuery, SearchResult } from './storage'
import { Tx, TxCUD, type TxWorkspaceEvent } from './tx'
import { Tx, TxCUD, WorkspaceEvent, type TxWorkspaceEvent } from './tx'
import { toFindResult } from './utils'

/**
Expand Down Expand Up @@ -249,7 +249,7 @@ export async function createClient (
client.updateFromRemote(...tx)
}
for (const t of tx) {
if (t._class === core.class.TxWorkspaceEvent) {
if (t._class === core.class.TxWorkspaceEvent && (t as TxWorkspaceEvent).event === WorkspaceEvent.LastTx) {
lastTx = (t as TxWorkspaceEvent).params.lastTx
}
}
Expand Down

0 comments on commit 9c7ce99

Please sign in to comment.