From 5c2e717a403a979d6ef5f412cfdebd7c54601620 Mon Sep 17 00:00:00 2001 From: Sercan Yemen Date: Fri, 8 Dec 2017 09:34:30 +0300 Subject: [PATCH] Make sure the nav item has children before trying to get them + Added LICENSE file + Renamed the KnowledgeBase demo module --- LICENSE | 1 + src/app/core/components/navigation/navigation.service.ts | 5 ++++- .../content/pages/knowledge-base/knowledge-base.module.ts | 2 +- src/app/main/content/pages/pages.module.ts | 4 ++-- 4 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..94e394b4 --- /dev/null +++ b/LICENSE @@ -0,0 +1 @@ +https://themeforest.net/licenses/terms/regular \ No newline at end of file diff --git a/src/app/core/components/navigation/navigation.service.ts b/src/app/core/components/navigation/navigation.service.ts index b9b912de..6e6c051c 100644 --- a/src/app/core/components/navigation/navigation.service.ts +++ b/src/app/core/components/navigation/navigation.service.ts @@ -179,7 +179,10 @@ export class FuseNavigationService if ( navItem.type === 'collapse' || navItem.type === 'group' ) { - this.getFlatNavigation(navItem.children); + if ( navItem.children ) + { + this.getFlatNavigation(navItem.children); + } } } diff --git a/src/app/main/content/pages/knowledge-base/knowledge-base.module.ts b/src/app/main/content/pages/knowledge-base/knowledge-base.module.ts index a891cb47..a29ae8b5 100644 --- a/src/app/main/content/pages/knowledge-base/knowledge-base.module.ts +++ b/src/app/main/content/pages/knowledge-base/knowledge-base.module.ts @@ -31,6 +31,6 @@ const routes = [ FuseKnowledgeBaseArticleComponent ] }) -export class FuseKnowledgeBaseModule +export class KnowledgeBaseModule { } diff --git a/src/app/main/content/pages/pages.module.ts b/src/app/main/content/pages/pages.module.ts index 17d17e1b..786c9792 100644 --- a/src/app/main/content/pages/pages.module.ts +++ b/src/app/main/content/pages/pages.module.ts @@ -20,7 +20,7 @@ import { PricingModule } from './pricing/pricing.module'; import { ProfileModule } from './profile/profile.module'; import { SearchModule } from './search/search.module'; import { FaqModule } from './faq/faq.module'; -import { FuseKnowledgeBaseModule } from './knowledge-base/knowledge-base.module'; +import { KnowledgeBaseModule } from './knowledge-base/knowledge-base.module'; @NgModule({ imports: [ @@ -63,7 +63,7 @@ import { FuseKnowledgeBaseModule } from './knowledge-base/knowledge-base.module' FaqModule, // Knowledge base - FuseKnowledgeBaseModule + KnowledgeBaseModule ] }) export class PagesModule