fix(site): ignore fileInfo if file is missing (#12154)

This commit is contained in:
Marcin Tojek 2024-02-15 10:15:22 +01:00 committed by GitHub
parent d9f99da327
commit 8cc62fb221
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -42,7 +42,7 @@ export const TemplateFiles: FC<TemplateFilesProps> = ({
const fileInfo = useCallback(
(filename: string) => {
const value = currentFiles[filename].trim();
const previousValue = baseFiles ? baseFiles[filename].trim() : undefined;
const previousValue = baseFiles ? baseFiles[filename]?.trim() : undefined;
const hasDiff = previousValue && value !== previousValue;
return {