Skip to content

Commit 43a12b0

Browse files
committed
Cast visibility callback result to bool
1 parent 7e7fafe commit 43a12b0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Schema/Concerns/HasVisibility.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ public function isVisible(Context $context): bool
4040
return $this->visible;
4141
}
4242

43-
return isset($context->model)
43+
return (bool) (isset($context->model)
4444
? ($this->visible)($context->model, $context)
45-
: ($this->visible)($context);
45+
: ($this->visible)($context));
4646
}
4747
}

0 commit comments

Comments
 (0)