waibu 2.15.0 → 2.15.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.
@@ -58,6 +58,8 @@ async function buildLocals ({ tpl, params = {}, opts = {} } = {}) {
58
58
  const { req, reply } = opts
59
59
 
60
60
  const _meta = { template: tpl }
61
+ params.page = merge(params.page ?? {}, { ns: req.ns, features: [] })
62
+ params.sidebar = params.sidebar ?? []
61
63
  if (params.error) {
62
64
  if (params.error.statusCode) _meta.statusCode = params.error.statusCode
63
65
  _meta.errorMessage = params.error.message
@@ -66,8 +68,6 @@ async function buildLocals ({ tpl, params = {}, opts = {} } = {}) {
66
68
  if (this.app.bajo.config.env === 'dev') console.log(params.error)
67
69
  }
68
70
  if (!opts.partial) {
69
- params.page = merge(params.page ?? {}, { ns: req.ns, features: [] })
70
- params.sidebar = params.sidebar ?? []
71
71
  merge(_meta, pick(req, ['site', 'user', 'lang', 'darkMode', 'url']))
72
72
  _meta.params = cloneDeep(req.params)
73
73
  _meta.query = cloneDeep(req.query)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "waibu",
3
- "version": "2.15.0",
3
+ "version": "2.15.1",
4
4
  "description": "Web Framework for Bajo",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/wiki/CHANGES.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changes
2
2
 
3
+ ## 2026-05-29
4
+
5
+ - [2.15.1] Bug fix in ```build-locals.js```
6
+
3
7
  ## 2026-05-28
4
8
 
5
9
  - [2.15.0] Change hooks to be written in one ```hook.js``` file