Skip to content

Commit 07385cb

Browse files
jounisuoAdrian Gorny
authored andcommitted
Fixed bc-bootstrap-collection.js .size() deprecations.
1 parent de03ec3 commit 07385cb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Resources/js/bc-bootstrap-collection.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535
var collection = $('#'+selector),
3636
list = collection.find('> ul'),
37-
count = list.find('> li').size()
37+
count = list.find('> li').length
3838
;
3939

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

0 commit comments

Comments
 (0)