Skip to content

Commit b8cd2a7

Browse files
authored
feat(api): call toString() on dialog title and message, closes #4583 (#4588)
1 parent a1d569b commit b8cd2a7

File tree

4 files changed

+15
-9
lines changed

4 files changed

+15
-9
lines changed

.changes/dialog-to-string.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"api": patch
3+
"tauri": patch
4+
---
5+
6+
Use `toString()` on message/confirm/ask dialogs title and message values.

core/tauri/scripts/bundle.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/tauri/scripts/core.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@
251251
__tauriModule: 'Dialog',
252252
message: {
253253
cmd: 'messageDialog',
254-
message: message
254+
message: message.toString()
255255
}
256256
})
257257
}
@@ -261,7 +261,7 @@
261261
__tauriModule: 'Dialog',
262262
message: {
263263
cmd: 'confirmDialog',
264-
message: message
264+
message: message.toString()
265265
}
266266
})
267267
}

tooling/api/src/dialog.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,8 @@ async function message(
207207
__tauriModule: 'Dialog',
208208
message: {
209209
cmd: 'messageDialog',
210-
message,
211-
title: opts?.title,
210+
message: message.toString(),
211+
title: opts?.title?.toString(),
212212
type: opts?.type
213213
}
214214
})
@@ -237,8 +237,8 @@ async function ask(
237237
__tauriModule: 'Dialog',
238238
message: {
239239
cmd: 'askDialog',
240-
message,
241-
title: opts?.title,
240+
message: message.toString(),
241+
title: opts?.title?.toString(),
242242
type: opts?.type
243243
}
244244
})
@@ -267,8 +267,8 @@ async function confirm(
267267
__tauriModule: 'Dialog',
268268
message: {
269269
cmd: 'confirmDialog',
270-
message,
271-
title: opts?.title,
270+
message: message.toString(),
271+
title: opts?.title?.toString(),
272272
type: opts?.type
273273
}
274274
})

0 commit comments

Comments
 (0)