fix: default to in-memory db only on db read fail (#155)
This commit is contained in:
parent
a9cbcaad79
commit
1b54f5a902
@ -12,7 +12,6 @@ export function useQuery(query: string, limit: number = 5) {
|
|||||||
() => db.query(query)
|
() => db.query(query)
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
console.error(err)
|
console.error(err)
|
||||||
}).then(() => {
|
|
||||||
return inMemoryDb.query(query)
|
return inMemoryDb.query(query)
|
||||||
}),
|
}),
|
||||||
[query],
|
[query],
|
||||||
|
Loading…
Reference in New Issue
Block a user