Skip to content

Commit

Permalink
Make sure that the action is appropriate: either system or with same …
Browse files Browse the repository at this point in the history
…entity type
  • Loading branch information
lucasvanschaik committed Feb 20, 2023
1 parent 4250109 commit a409d40
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/PresetReaction/PresetReaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ public function execute(EntityInterface $entity = NULL) {
$action_ids = $config['actions'];
foreach ($action_ids as $action_id) {
$action = $this->actionStorage->load($action_id);
// Make sure that the action is appropriate for the entity.
if ($entity->getEntityTypeId() === $action->getType()) {
// Make sure that the action is appropriate: either system or with same entity type.
if ($action->getType() === 'system' || $entity->getEntityTypeId() === $action->getType()) {
$action->execute([$entity]);
}
}
Expand Down

0 comments on commit a409d40

Please sign in to comment.