Skip to content

Commit df41dc7

Browse files
committed
fix TypedDocumentStore.exists implementation
1 parent 1215080 commit df41dc7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/TypedDocumentStore.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ export class TypedDocumentStore<T extends IdInterface, TIndex extends TIndexType
120120

121121
async exists(id: unknown) {
122122
const result = (this.db.exec(`select 1 from ${this.tableName} where ${dbRow.id} = ?;`, [<SqlValue>id]));
123-
return (result.values?.length ?? 0) > 0;
123+
return result[0].values.length > 0;
124124
}
125125

126126
async getAll() {

0 commit comments

Comments
 (0)