Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
componentWillMount() {
if (location.pathname === '/logout') {
localstorage.clear();
history.replace('/');
} else {
this.checkForCode();
}
}