PR feedback

This commit is contained in:
Andrew Kingston 2024-08-13 14:33:07 +01:00
parent 013f13315c
commit 6db20a241b
No known key found for this signature in database
2 changed files with 2 additions and 3 deletions

View File

@ -298,8 +298,7 @@ export const getActionProviders = (
// Find the definition of the action in question, if one is provided
.map(context => ({
...context,
action: context.contexts[0].actions.find(x => x.type === actionType),
action: context.contexts[0]?.actions?.find(x => x.type === actionType),
}))
// Filter out contexts which don't have this action
.filter(({ action }) => action != null)

View File

@ -151,7 +151,7 @@
const onSettingChange = (e, condition) => {
const setting = settings.find(x => x.key === e.detail)
if (setting?.defaultValue != null) {
condition.settingValue = setting?.defaultValue
condition.settingValue = setting.defaultValue
} else {
delete condition.settingValue
}