fix: convert fontSize type from String to Number

This commit is contained in:
Haileyesus
2026-02-23 09:52:39 +03:00
parent f1eca2f14d
commit 7dae488926
2 changed files with 3 additions and 2 deletions

View File

@@ -28,7 +28,8 @@ const readWordWrap = () => {
};
const readFontSize = () => {
return localStorage.getItem(CODE_EDITOR_STORAGE_KEYS.fontSize) ?? CODE_EDITOR_DEFAULTS.fontSize;
const stored = localStorage.getItem(CODE_EDITOR_STORAGE_KEYS.fontSize);
return Number(stored ?? CODE_EDITOR_DEFAULTS.fontSize);
};
export const useCodeEditorSettings = () => {

View File

@@ -9,7 +9,7 @@ type CodeEditorSurfaceProps = {
markdownPreview: boolean;
isMarkdownFile: boolean;
isDarkMode: boolean;
fontSize: string;
fontSize: number;
showLineNumbers: boolean;
extensions: Extension[];
};