Skip to content

Commit

Permalink
support null titles in AlertIOS
Browse files Browse the repository at this point in the history
Reviewed By: achen1

Differential Revision: D5807055

fbshipit-source-id: f79579d4cffb9792f49f89a7fb8f7df8e082a3a9
  • Loading branch information
11nc authored and facebook-github-bot committed Sep 11, 2017
1 parent 6114f86 commit d726c2c
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions Libraries/Alert/AlertIOS.js
Expand Up @@ -109,9 +109,7 @@ class AlertIOS {
* Create and display a popup alert.
* @static
* @method alert
* @param title The dialog's title.
*
* An empty string hides the title.
* @param title The dialog's title. Passing null or '' will hide the title.
* @param message An optional message that appears below
* the dialog's title.
* @param callbackOrButtons This optional argument should
Expand Down Expand Up @@ -211,7 +209,7 @@ class AlertIOS {
var callback = type;
var defaultValue = message;
RCTAlertManager.alertWithArgs({
title: title,
title: title || '',
type: 'plain-text',
defaultValue,
}, (id, value) => {
Expand Down Expand Up @@ -244,7 +242,7 @@ class AlertIOS {
}
RCTAlertManager.alertWithArgs({
title: title,
title: title || '',
message: message || undefined,
buttons,
type: type || undefined,
Expand Down

0 comments on commit d726c2c

Please sign in to comment.