8000 minor #11883 Bug fix: Update collection.rst (MarvinBlstrli) · symfony/symfony-docs@2aa326a · GitHub
[go: up one dir, main page]

Skip to content

Commit 2aa326a

Browse files
committed
minor #11883 Bug fix: Update collection.rst (MarvinBlstrli)
This PR was submitted for the master branch but it was merged into the 3.4 branch instead (closes #11883). Discussion ---------- Bug fix: Update collection.rst There is a typo in javascript that cause a bug in counter. Commits ------- c4f52fc fix javascript typo
2 parents ea6239e + c4f52fc commit 2aa326a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

reference/forms/types/collection.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ you need is this JavaScript code:
147147
jQuery('.add-another-collection-widget').click(function (e) {
148148
var list = jQuery(jQuery(this).attr('data-list'));
149149
// Try to find the counter of the list or use the length of the list
150-
var counter = list.data('widget-counter') | list.children().length;
150+
var counter = list.data('widget-counter') || list.children().length;
151151
152152
// grab the prototype template
153153
var newWidget = list.attr('data-prototype');

0 commit comments

Comments
 (0)
0