Skip to content

Commit

Permalink
fix: Ternary operator condition is always true
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaucau committed May 1, 2023
1 parent a89da68 commit b2ebb94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Middleware/LSTagsMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function process(ServerRequestInterface $request, RequestHandlerInterface
if (! empty($params) && ! empty($params['id'])) {
// The id parameter contains the slug. We only need the id (int)
$id = explode('-', $params['id'], 2)[0];
$lsTagsString .= ",$rootRouteName".$id ?: $params['id'];
$lsTagsString .= ",$rootRouteName".$id;
}

return $response->withHeader(LSCacheHeadersEnum::TAG, $lsTagsString);
Expand Down

0 comments on commit b2ebb94

Please sign in to comment.