Skip to content

Commit

Permalink
ethereum-indexer-browser: prevent re-initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
wighawag committed Aug 29, 2024
1 parent 7e11031 commit 2cbaf19
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 4 deletions.
7 changes: 7 additions & 0 deletions examples/mud/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# web-demo

## 0.1.70

### Patch Changes

- Updated dependencies
- ethereum-indexer-browser@0.7.7

## 0.1.69

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion examples/mud/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "mud-demo",
"private": true,
"version": "0.1.69",
"version": "0.1.70",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
7 changes: 7 additions & 0 deletions examples/web-demo/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# web-demo

## 0.1.70

### Patch Changes

- Updated dependencies
- ethereum-indexer-browser@0.7.7

## 0.1.69

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion examples/web-demo/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "web-demo",
"private": true,
"version": "0.1.69",
"version": "0.1.70",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
6 changes: 6 additions & 0 deletions packages/ethereum-indexer-browser/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# ethereum-indexer-browser

## 0.7.7

### Patch Changes

- prevent re-initialization

## 0.7.6

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/ethereum-indexer-browser/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ethereum-indexer-browser",
"version": "0.7.6",
"version": "0.7.7",
"publishConfig": {
"access": "public"
},
Expand Down
3 changes: 3 additions & 0 deletions packages/ethereum-indexer-browser/src/IndexerState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ export function createIndexerState<ABI extends Abi, ProcessResultType, Processor
},
processorConfig?: ProcessorConfig
) {
if (indexer) {
throw new Error(`already initialised`);
}
const config = {...{}, keepStream: options?.keepStream, ...(indexerSetup.config || {})};
const source = indexerSetup.source;

Expand Down
2 changes: 1 addition & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2cbaf19

Please sign in to comment.