Skip to content

Commit c13db88

Browse files
committed
docs: clarified deleteIndexedDbDb only knows about DBs that have been loaded at least once
1 parent fe1bbe5 commit c13db88

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/runtime/utils/clientDatabaseManager.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,10 @@ export class ClientDatabaseManager {
273273
* PGlite does not have a close method yet, see [pglite#142](https://github.com/electric-sql/pglite/issues/142).
274274
*
275275
* This is a hackish solution and is only meant to work before page navigation as something is causing issues and not letting the db be deleted. See code.
276+
*
277+
* Note that you might get an error if a database doesn't exist (even though
278+
* the indexedDb does) as it must have been "used"/loaded at least once for
279+
* us to know it exists. Just do useClientDb(name) then delete.
276280
*/
277281
async deleteIndexedDbDb(
278282
name: string = this.defaultDatabaseName

0 commit comments

Comments
 (0)