Skip to content

Commit 27b8b74

Browse files
committed
clearData returns Promise - fixes #12
1 parent 7b3fa50 commit 27b8b74

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/y-indexeddb.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,11 @@ export class IndexeddbPersistence extends Observable {
128128

129129
/**
130130
* Destroys this instance and removes all data from indexeddb.
131+
*
132+
* @return {Promise<void>}
131133
*/
132134
clearData () {
133-
this.destroy().then(() => {
135+
return this.destroy().then(() => {
134136
idb.deleteDB(this.name)
135137
})
136138
}

0 commit comments

Comments
 (0)