Skip to content

Commit

Permalink
IBX-5981: Fixed mutation observer in content create validation (#828)
Browse files Browse the repository at this point in the history
  • Loading branch information
dew326 authored Jun 29, 2023
1 parent 8edefa8 commit aedd6b1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@
const classChangedCallback = (mutationList) => {
mutationList.forEach((mutation) => {
const { oldValue, target } = mutation;
const hadIsInvalidClass = oldValue.includes('.is-invalid');
const hadIsInvalidClass = oldValue?.includes('.is-invalid') ?? false;
const hasIsInvalidClass = target.classList.contains('is-invalid');

if (hadIsInvalidClass !== hasIsInvalidClass) {
Expand Down

0 comments on commit aedd6b1

Please sign in to comment.