|
@@ -172,7 +172,7 @@ const actionsMap: Record<string, string> = {
|
|
|
};
|
|
|
const keys = Object.keys(actionsMap);
|
|
|
const amActions = computed(() => {
|
|
|
- const actions = amMap[props.am.id].am?.getSupportActions() || [];
|
|
|
+ const actions = amMap[props.am.id]?.am?.getSupportActions() || [];
|
|
|
return actions.map(({ name: action, duration }) => {
|
|
|
let key = action.toLowerCase().replaceAll(/( |-)/gi, "_");
|
|
|
!keys.find((k) => key.includes(k)) && console.log(key);
|
|
@@ -199,7 +199,7 @@ const selectPathHandler = () => {
|
|
|
};
|
|
|
|
|
|
const getActionDur = (key: string) => {
|
|
|
- const actions = amMap[props.am.id].am?.getSupportActions() || [];
|
|
|
+ const actions = amMap[props.am.id]?.am?.getSupportActions() || [];
|
|
|
const action = actions.find((item) => item.name === key);
|
|
|
if (action?.duration) {
|
|
|
return round(action?.duration);
|