Re-add original conditions

This commit is contained in:
Oliver Davies 2020-05-10 13:15:07 +01:00
parent e0c27f6649
commit c0a132a1bb

View file

@ -24,7 +24,11 @@ final class UpdateTalkCreatedDateOnSave implements EventSubscriberInterface {
}
public function entityInsertOrUpdate(BaseEntityEvent $event): void {
if (!$event->getEntity() instanceof Node) {
if ($event->getEntity()->getEntityTypeId() != 'node') {
return;
}
if ($event->getEntity()->bundle() != 'talk') {
return;
}