Commit 5fde6a1f authored by Rafael Monnerat's avatar Rafael Monnerat

erp5_json_editor: properly implement checkValidity

parent 66a981f1
...@@ -420,9 +420,9 @@ ...@@ -420,9 +420,9 @@
return form_data; return form_data;
}) })
.declareMethod('checkValidity', function () { .declareMethod('checkValidity', function () {
if (this.state.errors !== undefined) { if (this.editor === undefined) {
return this.state.errors.length === 0; return true;
} }
return true; return isEmpty(this.editor.validate());
}); });
}(window, rJS, RSVP, JSONEditor, domsugar, JSON, $RefParser, URL)); }(window, rJS, RSVP, JSONEditor, domsugar, JSON, $RefParser, URL));
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment