Skip to content

Commit

Permalink
fix(fix opening sidebar direct through url): Check if leafletBottomCo…
Browse files Browse the repository at this point in the history
…ntainer is null

All direct links that open the sidebar with information are broken on mobile devices because
leafletBottomContainer is null during resolving the states and in the calling stack of the
controllers.

fix #253
  • Loading branch information
mpfeil committed Feb 6, 2018
1 parent d56847a commit 7ca4815
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/scripts/controllers/sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
'bottom': vm.maximizedStyle.bottom,
'top': vm.maximizedStyle.top
};
if (isMobile.phone) {
if (isMobile.phone && leafletBottomContainer !== null) {
leafletBottomContainer.setAttribute("style", "bottom: 0px");
}
}
Expand Down

0 comments on commit 7ca4815

Please sign in to comment.