chore: fix window type theme service

This commit is contained in:
Faisal Amir 2025-10-02 20:29:13 +07:00
parent be9a6c0254
commit 83fc68e27d

View File

@ -3,7 +3,7 @@
*/
import { Theme } from '@tauri-apps/api/window'
import { getAllWebviewWindows } from '@tauri-apps/api/webviewWindow'
import { getAllWebviewWindows, type WebviewWindow } from '@tauri-apps/api/webviewWindow'
import type { ThemeMode } from './types'
import { DefaultThemeService } from './default'
@ -16,7 +16,7 @@ export class TauriThemeService extends DefaultThemeService {
const allWindows = await getAllWebviewWindows()
// Convert to array if it's not already
const windowsArray = Array.isArray(allWindows)
const windowsArray: WebviewWindow[] = Array.isArray(allWindows)
? allWindows
: Object.values(allWindows)