Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add tauriReady function to core #12586

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open
Changes from 1 commit
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
Prev Previous commit
Fix formatting
  • Loading branch information
alexmoon committed Jan 31, 2025
commit 29afa3660615a6db18103d5eee59c73e7547a965
8 changes: 4 additions & 4 deletions packages/api/src/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -308,11 +308,11 @@ function isTauri(): boolean {

function tauriReady(): Promise<void> {
if (window.__TAURI_INTERNALS__?.ready) {
return Promise.resolve();
return Promise.resolve()
} else {
return new Promise((resolve) => {
window.addEventListener("tauriReady", () => resolve());
});
window.addEventListener('tauriReady', () => resolve())
})
}
}

Expand All @@ -329,5 +329,5 @@ export {
invoke,
convertFileSrc,
isTauri,
tauriReady,
tauriReady
}
Loading