Skip to content

Commit 594b6d6

Browse files
committed
94485: Use relative path for theme CSS
This bug was originally fixed in DSpace#1642 but reintroduced in DSpace#1805
1 parent c844423 commit 594b6d6

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/app/shared/theme-support/theme.service.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ describe('ThemeService', () => {
413413
link.setAttribute('rel', 'stylesheet');
414414
link.setAttribute('type', 'text/css');
415415
link.setAttribute('class', 'theme-css');
416-
link.setAttribute('href', '/custom-theme.css');
416+
link.setAttribute('href', 'custom-theme.css');
417417

418418
expect(headSpy.appendChild).toHaveBeenCalledWith(link);
419419
});

src/app/shared/theme-support/theme.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ export class ThemeService {
182182
link.setAttribute('rel', 'stylesheet');
183183
link.setAttribute('type', 'text/css');
184184
link.setAttribute('class', 'theme-css');
185-
link.setAttribute('href', `/${encodeURIComponent(themeName)}-theme.css`);
185+
link.setAttribute('href', `${encodeURIComponent(themeName)}-theme.css`);
186186
// wait for the new css to download before removing the old one to prevent a
187187
// flash of unstyled content
188188
link.onload = () => {

0 commit comments

Comments
 (0)