Skip to content

Commit

Permalink
Fixed issue when used with Verbb's Control Panel Nav plugin
Browse files Browse the repository at this point in the history
Fixes #2, Fixes #4, Closes #3
  • Loading branch information
Tam committed Sep 27, 2018
1 parent 7dcfa99 commit 28802cc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.0.1 - 2018-09-27
### Fixed
- Fixed a bug when using Verbb's Control Panel Nav plugin

## 1.0.0
### Added
- Initial release
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "ether/tags",
"description": "A tag manager for Craft 3",
"type": "craft-plugin",
"version": "1.0.0",
"version": "1.0.1",
"keywords": [
"craft",
"cms",
Expand Down
3 changes: 2 additions & 1 deletion src/TagManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,14 @@ public function onRegisterTagActions (RegisterElementActionsEvent $event)
public function onRegisterCpNavItems (RegisterCpNavItemsEvent $event)
{
$navItems = $event->navItems;
$navItemKeys = array_keys($navItems);
$i = count($navItems);

$tagsNavItemIndex = null;

while (--$i)
{
$item = $navItems[$i];
$item = $navItems[$navItemKeys[$i]];
$url = array_key_exists('url', $item) ? $item['url'] : null;

if ($url === 'tags')
Expand Down

0 comments on commit 28802cc

Please sign in to comment.