Skip to content

Commit 1fde486

Browse files
author
Dominic
committed
remove unwanted condition check
1 parent 8dfe26a commit 1fde486

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

app/code/Magento/Cms/Helper/Page.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,14 +180,15 @@ public function prepareResultPage(Action $action, $pageId = null)
180180
/**
181181
* Retrieve page direct URL
182182
*
183-
* @param string $pageId
184-
* @return string
183+
* @param null $pageId
184+
* @return string|null
185+
* @throws \Magento\Framework\Exception\NoSuchEntityException
185186
*/
186187
public function getPageUrl($pageId = null)
187188
{
188189
/** @var \Magento\Cms\Model\Page $page */
189190
$page = $this->_pageFactory->create();
190-
if ($pageId !== null && $pageId !== $page->getId()) {
191+
if ($pageId !== null) {
191192
$page->setStoreId($this->_storeManager->getStore()->getId());
192193
$page->load($pageId);
193194
}

0 commit comments

Comments
 (0)