diff --git a/CHANGELOG.md b/CHANGELOG.md index 972ce8b..5eb1b67 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to this project will be documented in this file. +## 1.12.2 - 2024.09.23 +### Fixed +* Fixed an exception that was getting thrown when Craft wasn't installed yet + ## 1.12.1 - 2024.04.15 ### Added * Stable release for Craft CMS 5 diff --git a/composer.json b/composer.json index 74a9667..cdf5d79 100755 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "nystudio107/craft-autocomplete", "description": "Provides Twig template IDE autocomplete of Craft CMS & plugin variables", "type": "yii2-extension", - "version": "1.12.1", + "version": "1.12.2", "keywords": [ "craft", "cms", diff --git a/src/Autocomplete.php b/src/Autocomplete.php index e43bdeb..54a83bb 100755 --- a/src/Autocomplete.php +++ b/src/Autocomplete.php @@ -137,12 +137,14 @@ public function registerEventHandlers() */ public function generateAutocompleteClasses() { - $autocompleteGenerators = $this->getAllAutocompleteGenerators(); - foreach ($autocompleteGenerators as $generatorClass) { - /* @var Generator $generatorClass */ - $generatorClass::generate(); + if (Craft::$app->getIsInstalled()) { + $autocompleteGenerators = $this->getAllAutocompleteGenerators(); + foreach ($autocompleteGenerators as $generatorClass) { + /* @var Generator $generatorClass */ + $generatorClass::generate(); + } + Craft::info('Autocomplete classes generated', __METHOD__); } - Craft::info('Autocomplete classes generated', __METHOD__); } /**