waibu-mpa 2.4.2 → 2.4.3

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.
@@ -10,13 +10,8 @@ async function viewEngineFactory () {
10
10
  }
11
11
 
12
12
  _applySetting = (locals = {}, opts = {}) => {
13
- const { req } = opts
14
- const { get } = this.app.lib._
15
13
  for (const key of ['theme', 'iconset']) {
16
- let item = get(this.app.waibuMpa, `config.${key}.set`, req[key])
17
- item = item ?? 'default'
18
- opts[key] = opts[key] ?? item
19
- req[key] = opts[key]
14
+ opts[key] = opts[key] ?? opts.req[key]
20
15
  }
21
16
  opts.postProcessor = applyFormat.bind(this.plugin)
22
17
  opts.groupId = opts.req.id
package/lib/decorate.js CHANGED
@@ -21,6 +21,7 @@ async function decorate () {
21
21
  opts.req = this.request
22
22
  opts.reply = this
23
23
  for (const item of ['theme', 'iconset']) {
24
+ if (!this.request[item]) this.request[item] = me[item + 's'][0].name
24
25
  if (me[item + 's'].length === 1) this.request[item] = me[item + 's'][0].name
25
26
  }
26
27
  const result = await me.render(tpl, params, opts)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "waibu-mpa",
3
- "version": "2.4.2",
3
+ "version": "2.4.3",
4
4
  "description": "MPA support for Waibu Framework",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/wiki/CHANGES.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changes
2
2
 
3
+ ## 2026-02-17
4
+
5
+ - [2.4.3] Bug fix on ```req.theme``` and ```req.iconset``` resolver
6
+
3
7
  ## 2026-02-10
4
8
 
5
9
  - [2.4.2] Put ```bajo-config``` as dependency