Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Seems like two variables in a function should be local, not global. This patch fixes that.
diff --git a/js/pattern.js b/js/pattern.js
index 8b0d120..05b8e6e 100644
--- a/js/pattern.js
+++ b/js/pattern.js
@@ -21,8 +21,8 @@
$.each(settings.commerce_bpc, function (source_id, options) {
$(options.target_wrapper).hide();
$(source_id, context).bind('change keyup', function() {
- target = $(options.target, context);
- target_wrapper = $(options.target_wrapper, context);
+ var target = $(options.target, context);
+ var target_wrapper = $(options.target_wrapper, context);
if ($(this).is(':disabled') || $(this).val() == '') {
target_wrapper.hide();
}
Please close this if I misunderstood something, I am new to Drupal.
Comment | File | Size | Author |
---|---|---|---|
avoid-leakage.patch | 654 bytes | olleolleolle |
Comments
Comment #1
sven.lauer CreditAttribution: sven.lauer commentedNice catch.
Committed and pushed to 1.x and 2.x. Thanks!