Skip to content

Commit

Permalink
MDL-35978 comments: fix for comments block which has no toggler
Browse files Browse the repository at this point in the history
  • Loading branch information
snake committed Jan 31, 2017
1 parent af65270 commit bb80768
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions comment/comment.js
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,9 @@ M.core_comment = {
if (img) {
img.set('src', M.util.image_url('t/expanded', 'core'));
}
commenttoggler.setAttribute('aria-expanded', 'true');
if (commenttoggler) {
commenttoggler.setAttribute('aria-expanded', 'true');
}
} else {
// hide
container.setStyle('display', 'none');
Expand All @@ -372,7 +374,9 @@ M.core_comment = {
if (ta) {
ta.set('value','');
}
commenttoggler.setAttribute('aria-expanded', 'false');
if (commenttoggler) {
commenttoggler.setAttribute('aria-expanded', 'false');
}
}
if (ta) {
//toggle_textarea.apply(ta, [false]);
Expand Down

0 comments on commit bb80768

Please sign in to comment.