Skip to content

Commit 48fbe59

Browse files
committed
check that fn is fn before functioning
1 parent db4e215 commit 48fbe59

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@nostrwatch/nostrawl",
3-
"version": "0.0.3",
3+
"version": "0.0.4",
44
"description": "A nostr library for continously retrieving events from nostr relays based on a set of filters.",
55
"main": "src/index.js",
66
"license": "MIT",

src/classes/Trawler.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ class NTTrawler {
7979
path: this.options.cache.path,
8080
compression: true
8181
});
82-
this?.options?.after_cacheOpen(this.cache)
83-
//console.log('cache opened')
82+
if(this?.options && this.options instanceof Function)
83+
this?.options?.after_cacheOpen(this.cache)
8484
}
8585

8686
async trawl(chunk, $job){

0 commit comments

Comments
 (0)