Skip to content

Commit 9028d13

Browse files
authored
Merge pull request #61100 from nextcloud/fix/fix-dist-css-support
fix: Correctly detect appid for dist css files
2 parents 51075dc + 71db0cc commit 9028d13

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('-', \end($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)