Add test to check for indexedDB connection

This commit is contained in:
Katrina Uychaco
2016-02-10 11:04:30 -08:00
parent fa70560eba
commit 7b808257a6
2 changed files with 11 additions and 0 deletions

View File

@@ -19,6 +19,10 @@ class StateStore {
})
}
connect () {
return this.dbPromise.then(db => !!db)
}
save (key, value) {
return this.dbPromise.then(db => {
if (!db) {