diff --git a/CHANGELOG.md b/CHANGELOG.md index 7cd9b6b..dc8a155 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/composer.json b/composer.json index cbf7e39..84eafca 100644 --- a/composer.json +++ b/composer.json @@ -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", diff --git a/src/TagManager.php b/src/TagManager.php index 3602f86..3d6ad15 100644 --- a/src/TagManager.php +++ b/src/TagManager.php @@ -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')