refactor: Enable lazy loading for images in BlogPostUtil and remove unnecessary whitespace in Copilot/Init.ts

This commit is contained in:
Simon Larsen 2024-09-05 13:49:41 +01:00
parent 94eaab9ca4
commit eac7134630
No known key found for this signature in database
GPG Key ID: 96C5DCA24769DBCA
3 changed files with 4 additions and 6 deletions

View File

@ -111,9 +111,9 @@ export default class BlogPostUtil {
public static async getBlogPost(fileName: string): Promise<BlogPost | null> {
let blogPost: BlogPost | null = this.getBlogPostFromCache(fileName);
// if (blogPost) {
// return Promise.resolve(blogPost);
// }
if (blogPost) {
return Promise.resolve(blogPost);
}
blogPost = await this.getBlogPostFromGitHub(fileName);

View File

@ -26,6 +26,7 @@ import ProcessUtil from "./Utils/Process";
let currentFixCount: number = 1;
const init: PromiseVoidFunction = async (): Promise<void> => {
// check if copilot is disabled.
if (GetIsCopilotDisabled()) {
logger.info("Copilot is disabled. Exiting.");

View File

@ -314,10 +314,7 @@ services:
# https://stackoverflow.com/questions/29181032/add-a-volume-to-docker-but-exclude-a-sub-folder
- /usr/src/app/node_modules/
- ./Common:/usr/src/Common
- /usr/src/Common/node_modules/
ports:
- '9985:9229' # Debugging port.
extends: