Fix editing unidentified type
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good

This commit is contained in:
Willem Dantuma 2020-07-22 08:22:35 +02:00
parent 60761e9f4a
commit 0da8d3d46d

View File

@ -109,8 +109,11 @@ export class AppCommonEffects {
withLatestFrom(this.store$.select(appCommonReducers.selectGetItemTypes)), withLatestFrom(this.store$.select(appCommonReducers.selectGetItemTypes)),
switchMap(([action, itemtypes]) => { switchMap(([action, itemtypes]) => {
var a = action as appCommonActions.EditItem; var a = action as appCommonActions.EditItem;
var itemType = itemtypes[a.item.itemType]; var editor = "property";
var editor = itemType.editor ? itemType.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]) this.router$.navigate(['/editor',editor,'item', a.item.code])
return []; return [];
} }