@dnax/core 0.4.0 → 0.4.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.
@@ -506,7 +506,7 @@ class useRest {
506
506
 
507
507
  let resultDocs = toJson(result.docs);
508
508
  if (typeof options?.elementAt == "number") {
509
- resultDocs = resultDocs[options?.elementAt] || null;
509
+ resultDocs = resultDocs[options?.elementAt] ?? null;
510
510
  }
511
511
  return resolve(resultDocs);
512
512
  } catch (err) {
package/lib/schema.ts CHANGED
@@ -118,7 +118,7 @@ function buildSchema(col: Collection) {
118
118
  if (f?.validate?.schema) {
119
119
  propertySchema[f.name] = f.validate.schema;
120
120
  }
121
- if (f?.defaultValue) {
121
+ if (f?.defaultValue !== undefined && f?.defaultValue !== null) {
122
122
  propertySchema[f.name] = propertySchema[f.name]?.default(f.defaultValue);
123
123
  }
124
124
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dnax/core",
3
- "version": "0.4.0",
3
+ "version": "0.4.2",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "bin": {