@fireproof/core 0.5.10 → 0.5.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -47,7 +47,7 @@ export function useFireproof (name = 'useFireproof', defineDatabaseFn = () => {}
47
47
  */
48
48
  const addSubscriber = (label, fn) => {
49
49
  // todo test that the label is not needed
50
- return database.subscribe(fn)
50
+ return database.registerListener(fn)
51
51
  // inboundSubscriberQueue.set(label, fn)
52
52
  }
53
53
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fireproof/core",
3
- "version": "0.5.10",
3
+ "version": "0.5.11",
4
4
  "description": "Cloudless database for apps, the browser, and IPFS",
5
5
  "main": "dist/src/fireproof.js",
6
6
  "module": "dist/src/fireproof.mjs",
package/src/db-index.js CHANGED
@@ -153,7 +153,7 @@ export class DbIndex {
153
153
  if (matches.length === 0) {
154
154
  matches = /=>\s*(.*)/.exec(this.mapFnString)
155
155
  }
156
- if (matches.length === 0) {
156
+ if (matches === null) {
157
157
  return this.mapFnString
158
158
  } else {
159
159
  // it's a consise arrow function, match everythign after the arrow