mirror of
https://github.com/usetrmnl/byos_laravel.git
synced 2026-03-14 12:23:33 +00:00
This commit is contained in:
parent
c7abc14e26
commit
5eb442d9d6
2 changed files with 22 additions and 18 deletions
|
|
@ -156,7 +156,7 @@ class CheckVersionUpdateJob
|
|||
|
||||
private function extractLatestVersion(array $response, bool $enablePrereleases): array
|
||||
{
|
||||
if (! $enablePrereleases || ! is_array($response) || ! isset($response[0])) {
|
||||
if (! $enablePrereleases || ! isset($response[0])) {
|
||||
return [
|
||||
Arr::get($response, 'tag_name'),
|
||||
$response,
|
||||
|
|
|
|||
|
|
@ -87,7 +87,10 @@ final class DeviceModel extends Model
|
|||
*/
|
||||
protected function cssVariables(): Attribute
|
||||
{
|
||||
return Attribute::get(function (mixed $value, array $attributes): array {
|
||||
/** @var Attribute<array<string, string>, array<string, string>> */
|
||||
return Attribute::get(
|
||||
/** @return array<string, string> */
|
||||
function (mixed $value, array $attributes): array {
|
||||
$vars = is_array($value) ? $value : (is_string($value) ? (json_decode($value, true) ?? []) : []);
|
||||
|
||||
if (config('app.puppeteer_window_size_strategy') !== 'v2') {
|
||||
|
|
@ -104,6 +107,7 @@ final class DeviceModel extends Model
|
|||
$vars['--screen-h'] = is_numeric($height) ? (int) $height.'px' : (string) $height;
|
||||
}
|
||||
|
||||
/** @var array<string, string> $vars */
|
||||
return $vars;
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue