Skip to content
This repository has been archived by the owner on Mar 23, 2023. It is now read-only.

Commit

Permalink
chore: remove logging
Browse files Browse the repository at this point in the history
  • Loading branch information
achingbrain committed Jun 10, 2020
1 parent 16c2301 commit 57522e9
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ class IdbDatastore extends Adapter {
}

if (!this._tx) {
console.info('creating new tx') // eslint-disable-line no-console
let cleanup

// idb gives us an `tx.done` promise, but awaiting on it then doing other
Expand All @@ -80,25 +79,14 @@ class IdbDatastore extends Adapter {
})

const tx = this.store.transaction(this.location, 'readwrite')
tx.oncomplete = () => {
console.info('complete') // eslint-disable-line no-console
cleanup()
}
tx.onerror = (err) => {
console.info('error', err) // eslint-disable-line no-console
cleanup()
}
tx.onabort = (err) => {
console.info('abort', err) // eslint-disable-line no-console
cleanup()
}
tx.oncomplete = cleanup
tx.onerror = cleanup
tx.onabort = cleanup

this._tx = {
tx,
done
}
} else {
console.info('reusing existing tx') // eslint-disable-line no-console
}

// we only operate on one object store so the tx.store property is set
Expand Down

0 comments on commit 57522e9

Please sign in to comment.