Skip to content

Instantly share code, notes, and snippets.

@poteto
Last active August 29, 2015 14:22
Show Gist options
  • Save poteto/ed4c64bbb886b0314ba2 to your computer and use it in GitHub Desktop.
Save poteto/ed4c64bbb886b0314ba2 to your computer and use it in GitHub Desktop.
let breadCrumb = this._lookupRoute(path).getWithDefault('breadCrumb', undefined);
const breadCrumbType = typeOf(breadCrumb);
if (breadCrumbType === 'undefined') {
breadCrumb = {
path,
linkable: defaultLinkable,
title: classify(name)
};
} else if (breadCrumbType === 'null') {
return;
} else {
setProperties(breadCrumb, {
path,
linkable: breadCrumb.hasOwnProperty('linkable') ? breadCrumb.linkable : defaultLinkable
});
}
return breadCrumb;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment