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

fixed: exception occurs when opening a discrepancy note #715

Merged
merged 1 commit into from
Oct 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading