bajo 2.4.0 → 2.4.1
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/class/bajo.js +2 -2
- package/package.json +1 -1
- package/wiki/CHANGES.md +1 -0
package/class/bajo.js
CHANGED
|
@@ -965,13 +965,13 @@ class Bajo extends Plugin {
|
|
|
965
965
|
} catch (err) {
|
|
966
966
|
return
|
|
967
967
|
}
|
|
968
|
-
let fns = filter(this.
|
|
968
|
+
let fns = filter(this.hooks, { ns, subNs, path })
|
|
969
969
|
if (isEmpty(fns)) return []
|
|
970
970
|
fns = orderBy(fns, ['level'])
|
|
971
971
|
const results = []
|
|
972
972
|
for (const i in fns) {
|
|
973
973
|
const fn = fns[i]
|
|
974
|
-
const scope = this.app[fn.src ?? 'main']
|
|
974
|
+
const scope = this.app[fn.src ?? 'main'] ?? this
|
|
975
975
|
if (fn.noWait) fn.handler.call(scope, ...args)
|
|
976
976
|
else {
|
|
977
977
|
const res = await fn.handler.call(scope, ...args)
|
package/package.json
CHANGED
package/wiki/CHANGES.md
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
## 2026-01-29
|
|
4
4
|
|
|
5
5
|
- [2.4.0] Hooks can now be added through ```config``` object. This is specially usefull if you provide a custom config object on app boot
|
|
6
|
+
- [2.4.1] Bug fix on ```runHook()``` resolver. Source defaults to ```main``` if not provided. Scope defaults to ```bajo``` if not found/initialized yet
|
|
6
7
|
|
|
7
8
|
## 2026-01-24
|
|
8
9
|
|