check that aside actually exists before querying the html length

This commit is contained in:
friendica
2014-03-29 00:04:06 -07:00
parent 86ec665565
commit 7ed177c7cd
3 changed files with 3 additions and 3 deletions

View File

@@ -25,7 +25,7 @@ $('#expand-aside').click(function() {
$('main').toggleClass('region_1-on');
});
if ($('aside').html().length == 0) {
if($('aside').length && $('aside').html().length == 0) {
$('#expand-aside').hide();
}