From b363c7113728a461db31d3561d74a765d7d9efd1 Mon Sep 17 00:00:00 2001 From: chouseknecht Date: Mon, 9 Sep 2013 15:18:39 -0400 Subject: [PATCH] Fixed js error that stopped login dialog from rendering in FF. --- awx/ui/static/lib/ansible/directives.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/awx/ui/static/lib/ansible/directives.js b/awx/ui/static/lib/ansible/directives.js index e3539e4b64..36b0b65327 100644 --- a/awx/ui/static/lib/ansible/directives.js +++ b/awx/ui/static/lib/ansible/directives.js @@ -120,7 +120,11 @@ angular.module('AWDirectives', ['RestServices', 'Utilities', 'AuthService', 'Hos elm.removeAttr('required'); if ($(elm).hasClass('lookup')) { var txt = $(elm).parent().parent().parent().find('label').text(); - $(elm).parent().parent().parent().find('label').text(txt.replace(/^*/,'')); + var txt = txt.replace(/^\*/,''); + var label = $(elm).parent().parent().parent().find('label'); + if (label) { + label.text(txt); + } } } if (scope[attrs.awRequiredWhen] && (viewValue == undefined || viewValue == null || viewValue == '')) {