Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Resources/js/bc-bootstrap-collection.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

var collection = $('#'+selector),
list = collection.find('> ul'),
count = list.find('> li').size()
count = list.find('> li').length
;

var newWidget = collection.attr('data-prototype');
Expand All @@ -43,7 +43,7 @@
// If it does, increase the count by one and try again
var newName = newWidget.match(/id="(.*?)"/);
var re = new RegExp(prototypeName, "g");
while ($('#' + newName[1].replace(re, count)).size() > 0) {
while ($('#' + newName[1].replace(re, count)).length > 0) {
count++;
}
newWidget = newWidget.replace(re, count);
Expand Down