@ekzo-dev/bootstrap-addons 5.2.4 → 5.2.5
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/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ekzo-dev/bootstrap-addons",
|
|
3
3
|
"description": "Aurelia Bootstrap additional component",
|
|
4
|
-
"version": "5.2.
|
|
4
|
+
"version": "5.2.5",
|
|
5
5
|
"homepage": "https://github.com/ekzo-dev/aurelia-components/tree/main/packages/bootstrap-addons",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -105,15 +105,17 @@ export class BsJsonInput {
|
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
get validator(): Validator | undefined {
|
|
108
|
-
const {
|
|
108
|
+
const { schemaVersion, disabled } = this;
|
|
109
|
+
// use raw object because proxies don't work with private properties
|
|
109
110
|
const rawThis = this['__raw__'] as BsJsonInput;
|
|
111
|
+
// use jsonSchema from raw object to pass original (non-proxied) object to AJV
|
|
112
|
+
const { jsonSchema } = rawThis;
|
|
110
113
|
|
|
111
114
|
if (jsonSchema && typeof jsonSchema === 'object' && !disabled) {
|
|
112
115
|
const ajv = rawThis.#initAjv(jsonSchema.$schema as string);
|
|
113
116
|
|
|
114
117
|
addFormats(ajv);
|
|
115
|
-
const
|
|
116
|
-
const validate = ajv.compile(clonedSchema);
|
|
118
|
+
const validate = ajv.compile(jsonSchema);
|
|
117
119
|
|
|
118
120
|
if (validate.errors) {
|
|
119
121
|
throw validate.errors[0];
|