Skip to content

Commit d7606f4

Browse files
committed
Resolve Console error when clicking checkbox at "Newsletter Problems Report" (issue 24102)
1 parent c6427d1 commit d7606f4

File tree

1 file changed

+5
-3
lines changed
  • app/code/Magento/Newsletter/view/adminhtml/templates/problem

1 file changed

+5
-3
lines changed

app/code/Magento/Newsletter/view/adminhtml/templates/problem/list.phtml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,11 @@ require(["prototype", "mage/adminhtml/events"], function(){
1818
problemController = {
1919
checkCheckboxes:function (controlCheckbox) {
2020
var elements = $('problemGrid').getElementsByClassName('problemCheckbox');
21-
elements.each(function (obj) {
22-
obj.checked = controlCheckbox.checked;
23-
});
21+
if (elements && elements.length) {
22+
elements.each(function (obj) {
23+
obj.checked = controlCheckbox.checked;
24+
});
25+
}
2426
},
2527
rowClick:function (e) {
2628
if (!Event.element(e).hasClassName('problemCheckbox')) {

0 commit comments

Comments
 (0)