Skip to content

Commit 4c8beed

Browse files
committed
fix: Correctly detect appid for dist css files
Follow-up of ab551c4 Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
1 parent 0a10ad4 commit 4c8beed

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

lib/private/TemplateLayout.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,10 @@ private function findStylesheetFiles(array $styles): array {
384384
public function getAppNamefromPath(string $path): string|false {
385385
if ($path !== '') {
386386
$pathParts = explode('/', $path);
387-
if ($pathParts[0] === 'css') {
387+
if ($pathParts[0] === 'dist') {
388+
// Return the part before the dash in the file name
389+
return explode('-', \array_last($pathParts), 2)[0];
390+
} elseif ($pathParts[0] === 'css') {
388391
// This is a scss request
389392
return $pathParts[1];
390393
} elseif ($pathParts[0] === 'core') {

0 commit comments

Comments
 (0)