Skip to content

Commit

Permalink
feat(api): call toString() on dialog title and message, closes #4583 (
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog committed Jul 5, 2022
1 parent a1d569b commit b8cd2a7
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
6 changes: 6 additions & 0 deletions .changes/dialog-to-string.md
@@ -0,0 +1,6 @@
---
"api": patch
"tauri": patch
---

Use `toString()` on message/confirm/ask dialogs title and message values.
2 changes: 1 addition & 1 deletion core/tauri/scripts/bundle.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions core/tauri/scripts/core.js
Expand Up @@ -251,7 +251,7 @@
__tauriModule: 'Dialog',
message: {
cmd: 'messageDialog',
message: message
message: message.toString()
}
})
}
Expand All @@ -261,7 +261,7 @@
__tauriModule: 'Dialog',
message: {
cmd: 'confirmDialog',
message: message
message: message.toString()
}
})
}
Expand Down
12 changes: 6 additions & 6 deletions tooling/api/src/dialog.ts
Expand Up @@ -207,8 +207,8 @@ async function message(
__tauriModule: 'Dialog',
message: {
cmd: 'messageDialog',
message,
title: opts?.title,
message: message.toString(),
title: opts?.title?.toString(),
type: opts?.type
}
})
Expand Down Expand Up @@ -237,8 +237,8 @@ async function ask(
__tauriModule: 'Dialog',
message: {
cmd: 'askDialog',
message,
title: opts?.title,
message: message.toString(),
title: opts?.title?.toString(),
type: opts?.type
}
})
Expand Down Expand Up @@ -267,8 +267,8 @@ async function confirm(
__tauriModule: 'Dialog',
message: {
cmd: 'confirmDialog',
message,
title: opts?.title,
message: message.toString(),
title: opts?.title?.toString(),
type: opts?.type
}
})
Expand Down

0 comments on commit b8cd2a7

Please sign in to comment.