From 0d349aa4b1fb53a4c19defddf33302173e889bf8 Mon Sep 17 00:00:00 2001 From: Alf Eaton <75253002+aeaton-overleaf@users.noreply.github.com> Date: Wed, 27 Jan 2021 09:55:06 +0000 Subject: [PATCH] Call buildCssPath with empty string for default template (#3594) * Call buildCssPath with empty string for default template Call buildCssPath with an empty string instead of null for the default template * Remove unused options argument This means we can also remove the empty strings for the themeModifier arg, instead passing undefined, to get the default arg GitOrigin-RevId: 78cd14ae7ab9d58f66c27cb54477d24b4bd494c7 --- services/web/app/src/infrastructure/ExpressLocals.js | 4 ++-- services/web/app/views/general/400.pug | 2 +- services/web/app/views/general/500.pug | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/services/web/app/src/infrastructure/ExpressLocals.js b/services/web/app/src/infrastructure/ExpressLocals.js index 0e7adacde6..5ba7760c0e 100644 --- a/services/web/app/src/infrastructure/ExpressLocals.js +++ b/services/web/app/src/infrastructure/ExpressLocals.js @@ -340,12 +340,12 @@ module.exports = function(webRouter, privateApiRouter, publicApiRouter) { { name: 'Default', val: '', - path: res.locals.buildCssPath(null, { hashedPath: true }) + path: res.locals.buildCssPath() }, { name: 'Light', val: 'light-', - path: res.locals.buildCssPath('light-', { hashedPath: true }) + path: res.locals.buildCssPath('light-') } ] } diff --git a/services/web/app/views/general/400.pug b/services/web/app/views/general/400.pug index fb5a4e1d57..f92a816eaf 100644 --- a/services/web/app/views/general/400.pug +++ b/services/web/app/views/general/400.pug @@ -4,7 +4,7 @@ html.full-height(itemscope, itemtype='http://schema.org/Product') title Something went wrong link(rel="icon", href="/favicon.ico") if buildCssPath - link(rel="stylesheet", href=buildCssPath(null, { hashedPath: true })) + link(rel="stylesheet", href=buildCssPath()) body.full-height .content.content-alt.full-height diff --git a/services/web/app/views/general/500.pug b/services/web/app/views/general/500.pug index 7b23626062..7523e58277 100644 --- a/services/web/app/views/general/500.pug +++ b/services/web/app/views/general/500.pug @@ -4,7 +4,7 @@ html.full-height(itemscope, itemtype='http://schema.org/Product') title Something went wrong link(rel="icon", href="/favicon.ico") if buildCssPath - link(rel="stylesheet", href=buildCssPath(null, { hashedPath: true })) + link(rel="stylesheet", href=buildCssPath()) body.full-height .content.content-alt.full-height