Commit 4abb9e49 authored by Rafael Monnerat's avatar Rafael Monnerat Committed by Kazuhiko Shiozaki

erp5_json_editor: properly implement checkValidity

parent 0b14bfd2
......@@ -420,9 +420,9 @@
return form_data;
})
.declareMethod('checkValidity', function () {
if (this.state.errors !== undefined) {
return this.state.errors.length === 0;
if (this.editor === undefined) {
return true;
}
return true;
return isEmpty(this.editor.validate());
});
}(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