Skip to content

Commit

Permalink
Merge pull request hyperledger-archives#13 from RyanLassigBanks/hideC…
Browse files Browse the repository at this point in the history
…anopy-element-check

Check if sideNav is in dom before hiding it
  • Loading branch information
RyanLassigBanks committed May 26, 2020
2 parents 60eb6c3 + c60c0cc commit 0131371
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/CanopyContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ export function CanopyProvider({

window.$CANOPY.hideCanopy = () => {
const sideNavElement = document.getElementById('root');
sideNavElement.classList.add('display-none');
if (sideNavElement) {
sideNavElement.classList.add('display-none');
}
};

window.$CANOPY.setUser = canopyUser => {
Expand Down

0 comments on commit 0131371

Please sign in to comment.