From 601852df873cf2856c71ab975e00550ea0f5466d Mon Sep 17 00:00:00 2001 From: Dominic Date: Wed, 22 Aug 2012 23:11:30 -0700 Subject: [PATCH] Renamed variable, avoid window.name collision Using a variable called `name` causes the global `window.name` to be reset. Simply renaming the variable prevents this. --- assets/js/frontend/add-to-cart-variation.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/js/frontend/add-to-cart-variation.js b/assets/js/frontend/add-to-cart-variation.js index 5572e30c544..74752290125 100644 --- a/assets/js/frontend/add-to-cart-variation.js +++ b/assets/js/frontend/add-to-cart-variation.js @@ -308,9 +308,9 @@ jQuery(document).ready(function($) { // Check if two arrays of attributes match function variations_match( attrs1, attrs2 ) { var match = true; - for ( name in attrs1 ) { - var val1 = attrs1[ name ]; - var val2 = attrs2[ name ]; + for ( attr_name in attrs1 ) { + var val1 = attrs1[ attr_name ]; + var val2 = attrs2[ attr_name ]; if ( val1 !== undefined && val2 !== undefined && val1.length != 0 && val2.length != 0 && val1 != val2 ) { match = false; }