🔧 Replace window with globalThis for determining innerWidth

This commit is contained in:
2026-01-28 19:54:41 +00:00
parent 49ce60ce80
commit 6060db82d7

View File

@@ -387,7 +387,7 @@ const hasFiles = computed(() => status.value.totalFiles > 0);
const fileTooLarge = computed(() => fileLines.value.length > 10000); const fileTooLarge = computed(() => fileLines.value.length > 10000);
const lineHeight = computed(() => { const lineHeight = computed(() => {
// Mobile-first: 24px on mobile, 20px on desktop // Mobile-first: 24px on mobile, 20px on desktop
return window.innerWidth < 768 ? 24 : 20; return globalThis.innerWidth < 768 ? 24 : 20;
}); });
const highlightConfig = computed(() => ({ const highlightConfig = computed(() => ({
theme: preferences.value.darkMode ? 'github-dark' : 'github', theme: preferences.value.darkMode ? 'github-dark' : 'github',