Skip to content

Commit

Permalink
Move buildLookup upper to add default value for view->key
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomasz Narloch committed Oct 9, 2017
1 parent 3a5506e commit 6e1e3d9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions libraries/src/Component/Router/Rules/MenuRules.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ public function preprocess(&$query)
// Get query language
$language = isset($query['lang']) ? $query['lang'] : '*';

if ($language !== '*' && isset($this->lookup[$language]) === false)
{
$this->buildLookup($language);
}

if ($active !== null)
{
// Test if query lang match active language
Expand Down Expand Up @@ -109,11 +114,6 @@ public function preprocess(&$query)
}
}

if ($language !== '*' && isset($this->lookup[$language]) === false)
{
$this->buildLookup($language);
}

$needles = $this->router->getPath($query);

$layout = '';
Expand Down

0 comments on commit 6e1e3d9

Please sign in to comment.