Skip to content

Commit

Permalink
Revert "Issue #3062446 by a.qala: duplicate if statements in "MenuLin…
Browse files Browse the repository at this point in the history
…kContent.php" on line 151 and 156 - Code Improvement in "Custom Menu Links" module"

This reverts commit dee0b4840ee406d21601935c098c776655536840.
  • Loading branch information
xjm committed May 20, 2020
1 parent 11785bc commit 72c743d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/menu_link_content/src/Plugin/Menu/MenuLinkContent.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@ protected function getEntity() {
// Fallback to the loading by the UUID.
$uuid = $this->getUuid();
$entity = $this->entityRepository->loadEntityByUuid('menu_link_content', $uuid);
}
if (!$entity) {
throw new PluginException("Entity not found through the menu link plugin definition and could not fallback on UUID '$uuid'");
}
// Clone the entity object to avoid tampering with the static cache.
Expand Down

0 comments on commit 72c743d

Please sign in to comment.