diff --git a/src/ThemeInstaller.php b/src/ThemeInstaller.php index b129d78..fe9fc35 100644 --- a/src/ThemeInstaller.php +++ b/src/ThemeInstaller.php @@ -30,17 +30,15 @@ public function getInstallPath(PackageInterface $package) */ protected function getBaseInstallationPath() { - if (!$this->composer || !$this->composer->getPackage()) { - return 'themes'; - } - - $extra = $this->composer->getPackage()->getExtra(); + if ($this->composer && $this->composer->getPackage()) { + $extra = $this->composer->getPackage()->getExtra(); - if (!$extra || empty($extra['theme-dir'])) { - return 'themes'; + if (array_key_exists('theme-dir', $extra)) { + return $extra['theme-dir']; + } } - return $extra['theme-dir']; + return 'themes'; } /**