diff --git a/reference/forms/types/collection.rst b/reference/forms/types/collection.rst index bca32951536..c0dd31b23c2 100644 --- a/reference/forms/types/collection.rst +++ b/reference/forms/types/collection.rst @@ -147,7 +147,7 @@ you need is this JavaScript code: jQuery('.add-another-collection-widget').click(function (e) { var list = jQuery(jQuery(this).attr('data-list')); // Try to find the counter of the list or use the length of the list - var counter = list.data('widget-counter') | list.children().length; + var counter = list.data('widget-counter') || list.children().length; // grab the prototype template var newWidget = list.attr('data-prototype');