Skip to content

Commit 491b295

Browse files
committed
Resolve Account sidebar current tab is not marked as Active (issue 24068)
1 parent 89cf888 commit 491b295

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/internal/Magento/Framework/View/Element/Html/Link/Current.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,9 @@ private function getMca()
8787
*/
8888
public function isCurrent()
8989
{
90-
return $this->getCurrent() || $this->getUrl($this->getPath()) == $this->getUrl($this->getMca());
90+
$pathUrl = preg_replace('/(\/index|(\/))+($|\/$)/', '', $this->getUrl($this->getPath()));
91+
$mcaUrl = preg_replace('/(\/index|(\/))+($|\/$)/', '', $this->getUrl($this->getMca()));
92+
return $this->getCurrent() || $pathUrl == $mcaUrl;
9193
}
9294

9395
/**

0 commit comments

Comments
 (0)