feat(api): call toString() on dialog title and message, closes #4583 (#4588)

This commit is contained in:
Lucas Fernandes Nogueira 2022-07-04 22:30:06 -03:00 committed by GitHub
parent a1d569bbc9
commit b8cd2a7993
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 9 deletions

View File

@ -0,0 +1,6 @@
---
"api": patch
"tauri": patch
---
Use `toString()` on message/confirm/ask dialogs title and message values.

File diff suppressed because one or more lines are too long

View File

@ -251,7 +251,7 @@
__tauriModule: 'Dialog',
message: {
cmd: 'messageDialog',
message: message
message: message.toString()
}
})
}
@ -261,7 +261,7 @@
__tauriModule: 'Dialog',
message: {
cmd: 'confirmDialog',
message: message
message: message.toString()
}
})
}

View File

@ -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
}
})
@ -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
}
})
@ -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
}
})