Skip to content

Fix array assets not being removed when dist file exists#1065

Merged
barryvdh merged 1 commit intomasterfrom
fix-array-assets
Apr 30, 2026
Merged

Fix array assets not being removed when dist file exists#1065
barryvdh merged 1 commit intomasterfrom
fix-array-assets

Conversation

@barryvdh
Copy link
Copy Markdown
Collaborator

Fixes #1063 (comment)

In the case of laravel-debugbar the assets were an array instead of string:

    public function getAssets(): array
    {
        return [
            'js' => [
                'widgets/sqlqueries/widget.js',
                __DIR__ . '/../../resources/queries/widget.js',
            ],
            'css' => 'widgets/sqlqueries/widget.css',
        ];
    }

Which is perfectly valid, but this doesn't work for the in in_array($asset, $this->distIncludedAssets, true) check. So force the assets as array and check each.

@barryvdh barryvdh merged commit 1690ee1 into master Apr 30, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant