Skip to content
This repository was archived by the owner on Apr 17, 2024. It is now read-only.

Commit dcbd89e

Browse files
author
Mateu Aguiló Bosch
committed
fix: remove dead code for Entity to JSON:API
See: https://www.drupal.org/node/2983182
1 parent 16d27b5 commit dcbd89e

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

modules/contenta_enhancements/contenta_enhancements.module

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -367,12 +367,7 @@ function contenta_enhancements_node_view_alter(array &$build, NodeInterface $ent
367367
return;
368368
}
369369
// Retrieve JSON API representation of this node.
370-
try {
371-
$entity_to_jsonapi = \Drupal::service('jsonapi_extras.entity.to_jsonapi');
372-
}
373-
catch (ServiceNotFoundException $e) {
374-
$entity_to_jsonapi = \Drupal::service('jsonapi.entity.to_jsonapi');
375-
}
370+
$entity_to_jsonapi = \Drupal::service('jsonapi_extras.entity.to_jsonapi');
376371
$normalized = $entity_to_jsonapi->normalize($entity);
377372

378373
// Generate markup.

0 commit comments

Comments
 (0)