Skip to content

Commit

Permalink
clearData returns Promise - fixes #12
Browse files Browse the repository at this point in the history
  • Loading branch information
dmonad committed Jan 4, 2021
1 parent 7b3fa50 commit 27b8b74
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/y-indexeddb.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,11 @@ export class IndexeddbPersistence extends Observable {

/**
* Destroys this instance and removes all data from indexeddb.
*
* @return {Promise<void>}
*/
clearData () {
this.destroy().then(() => {
return this.destroy().then(() => {
idb.deleteDB(this.name)
})
}
Expand Down

0 comments on commit 27b8b74

Please sign in to comment.