Skip to content

Commit d10298f

Browse files
committed
Merge branch 'master' into next
* master: Fix #390: No longer depend on return value of add-row handler.
2 parents f04ec74 + f48098e commit d10298f

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

‎feincms/static/feincms/item_editor.js‎

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -182,13 +182,12 @@ if(!Array.indexOf) {
182182
for(var i = 0; i < 2; i++){
183183
// Use Django's built-in inline spawing mechanism (Django 1.2+)
184184
// must use django.jQuery since the bound function lives there:
185-
var returned = django.jQuery('#'+modvar+'_set-group').find(
185+
django.jQuery('#'+modvar+'_set-group').find(
186186
'div.add-row > a').triggerHandler('click');
187-
if(returned==false) break; // correct return value
188-
}
189-
var new_form_count = parseInt($('#id_'+modvar+'_set-TOTAL_FORMS').val(), 10);
190-
if(new_form_count > old_form_count){
191-
return $('#'+modvar+'_set-'+(new_form_count-1));
187+
var new_form_count = parseInt($('#id_'+modvar+'_set-TOTAL_FORMS').val(), 10);
188+
if(new_form_count > old_form_count){
189+
return $('#'+modvar+'_set-'+(new_form_count-1));
190+
}
192191
}
193192
}
194193

0 commit comments

Comments
 (0)