Skip to content

Commit ba45c6e

Browse files
committed
Merge pull request #69 from asentner/master
Check for child.tagName before using it in Resources/public/js/fp_js_validator.js
2 parents 1a3663e + 8ef540f commit ba45c6e

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

Resources/public/js/FpJsFormValidator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -774,7 +774,7 @@ var FpJsFormValidator = new function () {
774774
* @return {HTMLElement|null}
775775
*/
776776
this.findParentForm = function (child) {
777-
if ('form' == child.tagName.toLowerCase()) {
777+
if (child.tagName && 'form' == child.tagName.toLowerCase()) {
778778
return child;
779779
} else if (child.parentNode) {
780780
return this.findParentForm(child.parentNode);

Resources/public/js/fp_js_validator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -774,7 +774,7 @@ var FpJsFormValidator = new function () {
774774
* @return {HTMLElement|null}
775775
*/
776776
this.findParentForm = function (child) {
777-
if ('form' == child.tagName.toLowerCase()) {
777+
if (child.tagName && 'form' == child.tagName.toLowerCase()) {
778778
return child;
779779
} else if (child.parentNode) {
780780
return this.findParentForm(child.parentNode);

0 commit comments

Comments
 (0)