diff --git a/CHANGELOG.md b/CHANGELOG.md index 10c89f1..d65bb68 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +## [2.0.3](https://github.com/ipfs/js-blockstore-datastore-adapter/compare/v2.0.2...v2.0.3) (2021-09-29) + + +### Bug Fixes + +* access process from globalThis ([#14](https://github.com/ipfs/js-blockstore-datastore-adapter/issues/14)) ([7874fd7](https://github.com/ipfs/js-blockstore-datastore-adapter/commit/7874fd70540e1be985c4703ffbd635fe3764ba94)) + + + ## [2.0.2](https://github.com/ipfs/js-blockstore-datastore-adapter/compare/v2.0.1...v2.0.2) (2021-09-17) diff --git a/package.json b/package.json index fb46d00..bcda270 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "blockstore-datastore-adapter", - "version": "2.0.2", + "version": "2.0.3", "description": "datastore interface", "leadMaintainer": "Alex Potsides ", "main": "src/index.js", diff --git a/src/index.js b/src/index.js index 7fac33e..1e01908 100644 --- a/src/index.js +++ b/src/index.js @@ -244,7 +244,7 @@ export class BlockstoreDatastoreAdapter extends BaseBlockstore { // process.nextTick runs on the microtask queue, setImmediate runs on the next // event loop iteration so is slower. Use process.nextTick if it is available. - const runner = process && process.nextTick ? process.nextTick : setImmediate + const runner = globalThis.process && globalThis.process.nextTick ? globalThis.process.nextTick : (globalThis.setImmediate || globalThis.setTimeout) runner(async () => { try {