Skip to content

Commit

Permalink
fix(service): do not set api hosts option if empty config
Browse files Browse the repository at this point in the history
  • Loading branch information
yassinedoghri committed Mar 28, 2024
1 parent 694e8a8 commit 3a16841
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/Config/Services.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,14 @@ public static function iconify(bool $getShared = true): Iconify
/** @var IconifyConfig $config */
$config = config('Iconify');

return new Iconify([
'api_hosts' => $config->apiHosts,
$options = [
'icons_folder' => $config->iconsFolder,
]);
];

if ($config->apiHosts !== []) {
$options['api_hosts'] = $config->apiHosts;
}

return new Iconify($options);
}
}

0 comments on commit 3a16841

Please sign in to comment.