Skip to content

Commit d24dfd2

Browse files
authored
Merge pull request #254 from hpacleb/fix-use-gate-denies
fix: Use gate denies instead for readability
2 parents 4b7c470 + 51a97e9 commit d24dfd2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Html/Builder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ public function addScriptIf(bool $condition, string $view): static
276276

277277
public function addScriptIfCannot(string $ability, string $view): static
278278
{
279-
if (! (Gate::allows($ability))) {
279+
if (Gate::denies($ability)) {
280280
$this->addScript($view);
281281
}
282282

0 commit comments

Comments
 (0)