mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Check whether state store is connected when prompting to save files
This commit is contained in:
@@ -10,10 +10,12 @@ class StateStore {
|
||||
db.createObjectStore('states')
|
||||
}
|
||||
dbOpenRequest.onsuccess = () => {
|
||||
this.isConnected = true
|
||||
resolve(dbOpenRequest.result)
|
||||
}
|
||||
dbOpenRequest.onerror = (error) => {
|
||||
console.error('Could not connect to indexedDB', error)
|
||||
this.isConnected = false
|
||||
resolve(null)
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user