Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/lib/server/markdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ export async function processMarkdownWithPartials(content: string): Promise<stri

const partialContent = await readFile(partialPath, 'utf-8');
partialsCache.set(partialFile, partialContent);
} catch {
} catch (error) {
console.error('An error occured while loading partial', error);
Comment on lines +39 to +40
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fix typo in the error log message.

Line 40 has a typo (occuredoccurred), which makes diagnostics look less polished.

Proposed fix
-                console.error('An error occured while loading partial', error);
+                console.error('An error occurred while loading partial', error);
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
} catch (error) {
console.error('An error occured while loading partial', error);
} catch (error) {
console.error('An error occurred while loading partial', error);
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/lib/server/markdown.ts` around lines 39 - 40, In the catch block that
logs loading partial errors (the catch (error) handler that calls
console.error('An error occured while loading partial', error)), correct the
typo in the log message by changing "occured" to "occurred" so the console.error
call reads "An error occurred while loading partial" while preserving the error
object argument.

console.warn(`Partial not found: ${partialFile}`);
partialsCache.set(partialFile, '');
}
Expand Down