Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function getActivatedMenu() {
if (!location.hash || !location.hash.slice(1)) {
return;
}
let result;
Util.preOrderTraverse({
children: DEFAULT_MENU
}, node => {
if (node && node.route && node.route === location.hash.slice(1)) {
result = node;
return false;
}
});
return result;
}