Skip to content

Commit c1c48b2

Browse files
When no data return null
1 parent 526a8ad commit c1c48b2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/adapters/sqlite.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class SqliteAdapter {
4242
try {
4343
const record = await History.findOne({ where: { room, tick } })
4444
if (!record) {
45-
throw new Error('Record not found')
45+
return null
4646
}
4747
const data = JSON.parse(await gunzip(record.data, 'utf8'))
4848
if (typeof callback === 'function') callback(null, data)

0 commit comments

Comments
 (0)