From 28638b0a6bb9c131da4905ce26c4bc62f75c202e Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Thu, 14 Feb 2019 14:28:17 -0800 Subject: [PATCH] docs: update dialog documentation for "undefined" ret vals (#16970) --- docs/api/dialog.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/api/dialog.md b/docs/api/dialog.md index 45d0a794c21..ac5c0ebf899 100644 --- a/docs/api/dialog.md +++ b/docs/api/dialog.md @@ -55,7 +55,7 @@ The `dialog` module has the following methods: * `filePaths` String[] (optional) - An array of file paths chosen by the user. If the dialog is cancelled this will be `undefined`. * `bookmarks` String[] (optional) _macOS_ _mas_ - An array matching the `filePaths` array of base64 encoded strings which contains security scoped bookmark data. `securityScopedBookmarks` must be enabled for this to be populated. -Returns `String[]`, an array of file paths chosen by the user, +Returns `String[] | undefined`, an array of file paths chosen by the user, if the callback is provided it returns `undefined`. The `browserWindow` argument allows the dialog to attach itself to a parent window, making it modal. @@ -106,8 +106,8 @@ shown. * `filename` String (optional) If the dialog is cancelled this will be `undefined`. * `bookmark` String (optional) _macOS_ _mas_ - Base64 encoded string which contains the security scoped bookmark data for the saved file. `securityScopedBookmarks` must be enabled for this to be present. -Returns `String`, the path of the file chosen by the user, -if a callback is provided it returns `undefined`. +Returns `String | undefined`, the path of the file chosen by the user, +if a callback is provided or the dialog is cancelled it returns `undefined`. The `browserWindow` argument allows the dialog to attach itself to a parent window, making it modal.