'longname' property of tutorials is undefined

therefore uniqueness checking causes the navigation displays only one tutorial. Items without 'longname' should be omitted from checking.
This commit is contained in:
itantik 2014-12-30 22:08:41 +01:00
parent 1945e6322e
commit d57c67d9af

View File

@ -295,7 +295,10 @@ function buildMemberNav(items, itemHeading, itemsSeen, linktoFn) {
var itemsNav = ''; var itemsNav = '';
items.forEach(function(item) { items.forEach(function(item) {
if ( !hasOwnProp.call(itemsSeen, item.longname) ) { if ( !hasOwnProp.call(item, 'longname') ) {
itemsNav += '<li>' + linktoFn('', item.name) + '</li>';
}
else if ( !hasOwnProp.call(itemsSeen, item.longname) ) {
itemsNav += '<li>' + linktoFn(item.longname, item.name.replace(/^module:/, '')) + '</li>'; itemsNav += '<li>' + linktoFn(item.longname, item.name.replace(/^module:/, '')) + '</li>';
itemsSeen[item.longname] = true; itemsSeen[item.longname] = true;
} }