waibu 2.8.1 → 2.8.2

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.
@@ -19,9 +19,10 @@ export function normalizeValue (value) {
19
19
  }
20
20
 
21
21
  async function handleBody (options = {}) {
22
+ const { isPlainObject } = this.app.lib._
22
23
  const me = this
23
24
  this.instance.addHook('preValidation', async function (req, reply) {
24
- if (req.body) {
25
+ if (req.body && isPlainObject(req.body)) {
25
26
  for (const key in req.body) {
26
27
  req.body[key] = normalizeValue.call(me, req.body[key])
27
28
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "waibu",
3
- "version": "2.8.1",
3
+ "version": "2.8.2",
4
4
  "description": "Web Framework for Bajo",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/wiki/CHANGES.md CHANGED
@@ -3,6 +3,7 @@
3
3
  ## 2026-03-06
4
4
 
5
5
  - [2.8.1] Bug fix on ```req.body``` parsing
6
+ - [2.8.2] Bug fix on ```preValidation```
6
7
 
7
8
  ## 2026-03-02
8
9