diff --git a/package.json b/package.json index 0adbf88..9267fab 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "substreams-sink", - "version": "0.15.1", + "version": "0.15.2", "description": "Substreams Sink", "type": "module", "exports": "./dist/index.js", diff --git a/src/setup.ts b/src/setup.ts index 6f52d8e..789e6ed 100644 --- a/src/setup.ts +++ b/src/setup.ts @@ -22,7 +22,7 @@ export async function setup(options: RunOptions) { // Substreams endpoint let baseUrl = options.substreamsEndpoint; const token = options.substreamsApiKey ?? options.substreamsApiToken; - if ( token.includes(".")) throw new Error("JWT token is not longer supported, please use Substreams API key instead"); + if ( token?.includes(".")) throw new Error("JWT token is not longer supported, please use Substreams API key instead"); // append https if not present if (baseUrl.match(/http/) === null) {