Skip to content

Commit

Permalink
fix(core): fix incorrect isTauri return type (#9618)
Browse files Browse the repository at this point in the history
  • Loading branch information
typed-sigterm authored Apr 30, 2024
1 parent 1bb87a3 commit aa08069
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changes/api-isTauri-type.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@tauri-apps/api": "patch:bug"
---

Fix `isTauri` incorrect return type.
4 changes: 2 additions & 2 deletions tooling/api/src/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,8 @@ export class Resource {
}
}

function isTauri() {
return 'isTauri' in window && window.isTauri
function isTauri(): boolean {
return 'isTauri' in window && !!window.isTauri
}

export type { InvokeArgs, InvokeOptions }
Expand Down

0 comments on commit aa08069

Please sign in to comment.