dobo 2.39.1 → 2.39.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.
@@ -336,8 +336,11 @@ export async function getRefs (records = [], options = {}) {
336
336
  let items = isValues ? [...(rec[prop.name] ?? [])] : (rec[prop.name] ? [rec[prop.name]] : [])
337
337
  items = items.map(item => item + '')
338
338
  const res = results.filter(r => items.includes(r[ref.field] + ''))
339
+ /*
339
340
  if (res.length === 0) records[i]._ref[key] = isValues ? [] : {}
340
341
  else records[i]._ref[key] = isValues ? res : res[0]
342
+ */
343
+ if (res.length > 0) records[i]._ref[key] = isValues ? (res ?? []) : (res[0] ?? {})
341
344
  }
342
345
  } catch (err) {
343
346
  if (this.app.bajo.config.log.level === 'trace') console.error(err)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dobo",
3
- "version": "2.39.1",
3
+ "version": "2.39.2",
4
4
  "description": "DBMS for Bajo 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-10-17
4
+
5
+ - [2.39.2] Bug fix in `helper.getRefs()`
6
+
3
7
  ## 2026-09-06
4
8
 
5
9
  - [2.39.1] Bug fix in `helper.getRefs()`