Skip to content

Commit b0d32ff

Browse files
Copilottyler-dane
andcommitted
Fix code review issues: correct boolean comparison and improve error messages
Co-authored-by: tyler-dane <[email protected]>
1 parent b2e31b2 commit b0d32ff

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/web/src/common/utils/storage/indexeddb.util.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ export const getEventsFromIndexedDB = async (
2727

2828
// Filter by isSomeday
2929
if (someday !== undefined) {
30-
query = compassLocalDB.events.where("isSomeday").equals(someday ? 1 : 0);
30+
query = compassLocalDB.events
31+
.where("isSomeday")
32+
.equals(someday ? true : false);
3133
}
3234

3335
// Get all matching events
@@ -67,7 +69,7 @@ export const updateEventInIndexedDB = async (
6769
): Promise<void> => {
6870
const existing = await compassLocalDB.events.get(_id);
6971
if (!existing) {
70-
throw new Error(`Event with id ${_id} not found in IndexedDB`);
72+
throw new Error(`Event with id "${_id}" not found in IndexedDB for update`);
7173
}
7274

7375
await compassLocalDB.events.put({

0 commit comments

Comments
 (0)