Skip to content

Commit

Permalink
Merge pull request #6838 from lindapaiste/fix/invalid-create-radio
Browse files Browse the repository at this point in the history
Check the element type before calling `createRadio` from `select()`
  • Loading branch information
limzykenneth committed May 28, 2024
2 parents 91e91c6 + edf11fb commit 8e6ceff
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/dom/dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,8 @@ p5.prototype._wrapElement = function (elt) {
children.length > 0 &&
children.every(function (c) {
return c.tagName === 'INPUT' || c.tagName === 'LABEL';
})
}) &&
(elt.tagName === 'DIV' || elt.tagName === 'SPAN')
) {
return this.createRadio(new p5.Element(elt, this));
} else {
Expand Down

0 comments on commit 8e6ceff

Please sign in to comment.