mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-28 19:56:42 +00:00
Add check to prevent undefined access during action validation (#8257)
This commit is contained in:
parent
4d6c11ce31
commit
69d0a22091
@ -96,8 +96,14 @@ export interface EditSubElementEvent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const actionConfigStruct = dynamic((_value, ctx) => {
|
export const actionConfigStruct = dynamic((_value, ctx) => {
|
||||||
const test = actionConfigMap[ctx.branch[0][ctx.path[0]].action];
|
if (ctx.branch[0][ctx.path[0]]) {
|
||||||
return test || actionConfigStructType;
|
return (
|
||||||
|
actionConfigMap[ctx.branch[0][ctx.path[0]].action] ||
|
||||||
|
actionConfigStructType
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return actionConfigStructType;
|
||||||
});
|
});
|
||||||
|
|
||||||
const actionConfigStructUser = object({
|
const actionConfigStructUser = object({
|
||||||
|
Loading…
x
Reference in New Issue
Block a user