Skip to content

Commit dae26d1

Browse files
committed
only add delete link when delete checkbox is present
1 parent aaa288d commit dae26d1

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

src/jquery.formset.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -114,14 +114,14 @@
114114
// Hide any labels associated with the DELETE checkbox:
115115
$('label[for="' + del.attr('id') + '"]').hide();
116116
del.remove();
117-
}
118-
if (hasChildElements(row)) {
119-
row.addClass(options.formCssClass);
120-
if (row.is(':visible')) {
121-
insertDeleteLink(row);
122-
applyExtraClasses(row, i);
117+
if (hasChildElements(row)) {
118+
row.addClass(options.formCssClass);
119+
if (row.is(':visible')) {
120+
insertDeleteLink(row);
121+
applyExtraClasses(row, i);
122+
}
123123
}
124-
}
124+
}
125125
});
126126

127127
if ($$.length) {

0 commit comments

Comments
 (0)