mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-21 12:06:35 +08:00
fix: tauri loading and method loading
This commit is contained in:
@@ -40,7 +40,11 @@ export class DataCenter {
|
||||
};
|
||||
};
|
||||
// TODO: switch different provider
|
||||
if (typeof window !== 'undefined' && window.CLIENT_APP) {
|
||||
if (
|
||||
typeof window !== 'undefined' &&
|
||||
window.CLIENT_APP &&
|
||||
typeof window.__TAURI_IPC__ === 'function'
|
||||
) {
|
||||
const { TauriIPCProvider } = await import('./provider/tauri-ipc');
|
||||
dc.registerProvider(new TauriIPCProvider(getInitParams()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user