From 5880401d9dfc31e16eee3dda5e2c9aca6039320b Mon Sep 17 00:00:00 2001 From: Chris Dodge Date: Thu, 15 Jan 2015 18:58:11 -0500 Subject: [PATCH] add a missing check for an undefined object --- lms/templates/shoppingcart/shopping_cart.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lms/templates/shoppingcart/shopping_cart.html b/lms/templates/shoppingcart/shopping_cart.html index df7e3c4147..0fb52a306d 100644 --- a/lms/templates/shoppingcart/shopping_cart.html +++ b/lms/templates/shoppingcart/shopping_cart.html @@ -208,7 +208,7 @@ from django.utils.translation import ugettext as _ // before going to billing details page // if exists then trigger click event of the apply code button var code = $('div.code-input input#input_code').val(); - if (code!= ''){ + if (typeof(code) != 'undefined' && code != ''){ $('div.code-input #submit-code').trigger('click'); return false; }