Commit b36d8ba8b0e19b8373a93a36836861968874bc2d

Fix createNavigation

  Fix create navigation to not render 'Home' link if index page does not
have any children.
  • Diff rendering mode:
  • inline
  • side by side

js/mouchak.js

291 },291 },
292 createNavigation: function(page) {292 createNavigation: function(page) {
293 var li;293 var li;
294 if(page === 'index') {
294 if(page === 'index' && !_.isEmpty(M.pages.get(page).get('children'))) {
295 li = '<li class="active"><a href="#/index"> Home </a></li>';295 li = '<li class="active"><a href="#/index"> Home </a></li>';
296 $('#nav-index .nav').append(li);296 $('#nav-index .nav').append(li);
297 }297 }