Fix reusing same JS variable in form field dependency manager
authorMatthias Schmidt <gravatronics@live.com>
Sun, 30 Jun 2019 12:16:40 +0000 (14:16 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Sun, 30 Jun 2019 12:16:40 +0000 (14:16 +0200)
See #2509

wcfsetup/install/files/js/WoltLabSuite/Core/Form/Builder/Field/Dependency/Manager.js

index 3c26dbca6f551ed7d3352471d606ce6cc3310078..ffcb47be97389d4e73cdeb61a59e7edfb26b19ff 100644 (file)
@@ -338,7 +338,7 @@ define(['Dictionary', 'Dom/ChangeListener', 'EventHandler', 'List', 'Dom/Travers
                                
                                for (var i = 0, length = dependencies.length; i < length; i++) {
                                        var fields = dependencies[i].getFields();
-                                       for (var j = 0, length = fields.length; j < length; j++) {
+                                       for (var j = 0, fieldsLength = fields.length; j < fieldsLength; j++) {
                                                var field = fields[j];
                                                
                                                _fields.delete(field.id);