Skip to content

Commit

Permalink
Ensure string is returned
Browse files Browse the repository at this point in the history
  • Loading branch information
bencroker committed Oct 22, 2024
1 parent e1e2c56 commit f83a801
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "putyourlightson/craft-blitz-f5",
"description": "F5 cache purger for the Blitz plugin.",
"version": "0.0.1",
"version": "0.0.2",
"type": "craft-plugin",
"homepage": "https://putyourlightson.com/plugins/blitz",
"license": "proprietary",
Expand Down
4 changes: 2 additions & 2 deletions src/F5Purger.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,8 @@ public function getCondensedUriPattern(array $siteUris): string
{
$uris = array_map(fn($siteUri) => $siteUri->uri, $siteUris);

if (count($uris) < 2) {
return $uris[0];
if (count($uris) === 1) {
return $uris[0] ?? '';
}

// Get the longest common prefix between the two most dissimilar strings.
Expand Down

0 comments on commit f83a801

Please sign in to comment.