Skip to content

Commit

Permalink
Merge pull request #404 from jounisuo/develop
Browse files Browse the repository at this point in the history
Fix bc-bootstrap-collection.js .size() deprecations.
  • Loading branch information
Florian Eckerstorfer committed Nov 27, 2015
2 parents 12138be + 13ef39b commit 20cffee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Resources/js/bc-bootstrap-collection.js
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

0 comments on commit 20cffee

Please sign in to comment.