From 285e6aa8f9c911ce47dba616e2a2e83b20307310 Mon Sep 17 00:00:00 2001 From: Sean Harvey Date: Thu, 13 Sep 2007 03:17:35 +0000 Subject: [PATCH] this was checking if labels was an object, which failed when findParentLabel(el.parentNode) was called, it just returned 'this' instead on validation git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@41639 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- javascript/Validator.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/javascript/Validator.js b/javascript/Validator.js index def732993..9b788950d 100755 --- a/javascript/Validator.js +++ b/javascript/Validator.js @@ -172,7 +172,7 @@ function findParentLabel(el){ if(el.className){ if(el.className.indexOf('field') == 0){ labels = el.getElementsByTagName('label'); - if(labels && typeof(labels) == "object"){ + if(labels){ var left = findIndexOf(labels,'left'); var right = findIndexOf(labels,'right'); if(left){