Fix editing unidentified type
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good Details

2022.01
Willem Dantuma 2020-07-22 08:22:35 +02:00
parent 60761e9f4a
commit 0da8d3d46d
1 changed files with 5 additions and 2 deletions

View File

@ -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 [];
}