Skip to content
This repository has been archived by the owner on Jun 12, 2024. It is now read-only.

Commit

Permalink
Merge pull request #715 from OpenClinica/fix/dn-709
Browse files Browse the repository at this point in the history
fixed: exception occurs when opening a discrepancy note
  • Loading branch information
kkrumlian committed Oct 25, 2023
2 parents eadaa11 + 9e8aad7 commit d53b86b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion test/client/form-extensions.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ describe('Extended Form Class', () => {
expect(form.evaluationCascadeAdditions.length).to.equal(2);
});

it('has multiple invalid constraint classes', () => {
it('so that Form instance has multiple invalid constraint classes', () => {
expect(form.constraintClassesInvalid.length).to.be.above(1);
});

it('so that Form prototype has multiple invalid constraint classes', () => {
expect(Form.prototype.constraintClassesInvalid.length).to.be.above(1);
});
});
3 changes: 2 additions & 1 deletion widget/discrepancy-note/dn-widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -974,7 +974,8 @@ class Comment extends Widget {

return el ? el.textContent : '';
}
return Form.constraintClassesInvalid

return Form.prototype.constraintClassesInvalid
.map((invalidClass) => {
if (this.linkedQuestion.classList.contains(invalidClass)) {
const el = this.linkedQuestion.querySelector(
Expand Down

0 comments on commit d53b86b

Please sign in to comment.