diff --git a/server/server.ts b/server/server.ts index 76636cb9..ee103997 100644 --- a/server/server.ts +++ b/server/server.ts @@ -421,8 +421,10 @@ function indexRequest(req: Request, res: Response) { throw err; } - const config = getServerConfiguration() as IndexTemplateConfiguration; - config.cacheBust = Helper.getVersionCacheBust(); + const config: IndexTemplateConfiguration = { + ...getServerConfiguration(), + ...{cacheBust: Helper.getVersionCacheBust()}, + }; res.send(_.template(file)(config)); } @@ -901,11 +903,7 @@ function getClientConfiguration(): ClientConfiguration { } function getServerConfiguration(): ServerConfiguration { - const config = _.clone(Config.values) as ServerConfiguration; - - config.stylesheets = packages.getStylesheets(); - - return config; + return {...Config.values, ...{stylesheets: packages.getStylesheets()}}; } function performAuthentication(this: Socket, data) {