@dzeio/schema 0.4.1 → 0.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.
package/dist/Schema.js CHANGED
@@ -124,7 +124,7 @@ var _SchemaItem = class _SchemaItem {
124
124
  return this;
125
125
  }
126
126
  attrs(...attributes) {
127
- this.attributes.concat(attributes);
127
+ this.attributes.push(...attributes);
128
128
  return this;
129
129
  }
130
130
  attr(...attributes) {
@@ -326,7 +326,7 @@ var SchemaNullable = class extends SchemaItem {
326
326
  parse(input, options) {
327
327
  const res = super.parse(input, options);
328
328
  if (!res.valid) {
329
- return res;
329
+ return this.child.parse(input, options);
330
330
  }
331
331
  if (this.isNull(res.object)) {
332
332
  return {
package/dist/Schema.mjs CHANGED
@@ -81,7 +81,7 @@ var _SchemaItem = class _SchemaItem {
81
81
  return this;
82
82
  }
83
83
  attrs(...attributes) {
84
- this.attributes.concat(attributes);
84
+ this.attributes.push(...attributes);
85
85
  return this;
86
86
  }
87
87
  attr(...attributes) {
@@ -283,7 +283,7 @@ var SchemaNullable = class extends SchemaItem {
283
283
  parse(input, options) {
284
284
  const res = super.parse(input, options);
285
285
  if (!res.valid) {
286
- return res;
286
+ return this.child.parse(input, options);
287
287
  }
288
288
  if (this.isNull(res.object)) {
289
289
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dzeio/schema",
3
- "version": "0.4.1",
3
+ "version": "0.4.3",
4
4
  "dependencies": {
5
5
  "@dzeio/object-util": "^1.8.3"
6
6
  },