Skip to content

Commit

Permalink
fix: syncedDuring query
Browse files Browse the repository at this point in the history
  • Loading branch information
akdasa committed May 22, 2023
1 parent 035c844 commit ad44465
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
8 changes: 3 additions & 5 deletions lib/queries/sync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,14 @@ export function syncedDuring(
to: number
): Query<SyncAggregate<AnyIdentity>> {
const queryBuilder = new QueryBuilder<SyncAggregate<AnyIdentity>>()
return queryBuilder.and(
return queryBuilder.or(
queryBuilder.or(
queryBuilder.gt('syncedAt', from),
queryBuilder.eq('syncedAt', undefined),
queryBuilder.eq('syncedAt', 0),
),
queryBuilder.or(
queryBuilder.and(
queryBuilder.gt('syncedAt', from),
queryBuilder.lt('syncedAt', to),
queryBuilder.eq('syncedAt', undefined),
queryBuilder.eq('syncedAt', 0),
)
)
}
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@akdasa-studios/framework-sync",
"version": "0.2.1",
"version": "0.2.2",
"description": "Template",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
Expand Down

0 comments on commit ad44465

Please sign in to comment.