Commit e8b646ad authored by xjm's avatar xjm
Browse files

Revert "Issue #3062446 by a.qala: duplicate if statements in...

Revert "Issue #3062446 by a.qala: duplicate if statements in "MenuLinkContent.php" on line 151 and 156 - Code Improvement in "Custom Menu Links" module"

This reverts commit dee0b484.
parent ce8dfe3d
......@@ -141,6 +141,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.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment