From 0da8d3d46d5214ce5643dc9e747a9c5709f32783 Mon Sep 17 00:00:00 2001 From: Willem Dantuma Date: Wed, 22 Jul 2020 08:22:35 +0200 Subject: [PATCH] Fix editing unidentified type --- projects/common/src/fm/effects/app-common.effects.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/projects/common/src/fm/effects/app-common.effects.ts b/projects/common/src/fm/effects/app-common.effects.ts index 7a4406b..e52d323 100644 --- a/projects/common/src/fm/effects/app-common.effects.ts +++ b/projects/common/src/fm/effects/app-common.effects.ts @@ -109,8 +109,11 @@ export class AppCommonEffects { withLatestFrom(this.store$.select(appCommonReducers.selectGetItemTypes)), switchMap(([action, itemtypes]) => { var a = action as appCommonActions.EditItem; - var itemType = itemtypes[a.item.itemType]; - var editor = itemType.editor ? itemType.editor : "property"; + var editor = "property"; + if(a.item.itemType) { + var itemType = itemtypes[a.item.itemType]; + var editor = itemType.editor ? itemType.editor : editor; + } this.router$.navigate(['/editor',editor,'item', a.item.code]) return []; }