       store = txn.objectStore(entry.doc.slug)
 
       req = store.get(entry.dbPath())
-      req.onsuccess = -> if req.result then onSuccess(req.result) else onError()
-      req.onerror = onError
+      req.onsuccess = ->
+        if req.result then onSuccess(req.result) else onError()
+        return
+      req.onerror = (event) ->
+        event.preventDefault()
+        onError()
+        return
       @loadDocsCache(db) unless @cachedDocs
       return
 

    db.close()
    return

  onOpenError: =>
    @useIndexedDB = @open = false
    @runCallbacks()
    return

      @cachedDocs[cursor.key] = cursor.value
      cursor.continue()
      return
    req.onerror = (event) ->
      event.preventDefault()
      return
    return

  shouldLoadWithIDB: (entry) ->
