@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.
package/hooks/use-fireproof.js
CHANGED
@@ -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.
|
50
|
+
return database.registerListener(fn)
|
51
51
|
// inboundSubscriberQueue.set(label, fn)
|
52
52
|
}
|
53
53
|
|
package/package.json
CHANGED
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
|
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
|