send null instead of empty string for action sheet message

If the user wants to display only action sheet buttons w/o any text and
he sends null as message, the empty string causes an empty title to be
shown above the buttons. Having null instead, completely eliminates the
empty space.
This commit is contained in:
Peter Staev
2015-09-04 15:37:55 +03:00
parent a2508c10ef
commit 9a985e7efe

View File

@@ -445,7 +445,7 @@ export function action(arg: any): Promise<string> {
actionSheet.delegate = delegate;
actionSheet.showInView(UIApplication.sharedApplication().keyWindow);
} else {
var alertController = UIAlertController.alertControllerWithTitleMessagePreferredStyle(options.message, "", UIAlertControllerStyle.UIAlertControllerStyleActionSheet);
var alertController = UIAlertController.alertControllerWithTitleMessagePreferredStyle(options.message, null, UIAlertControllerStyle.UIAlertControllerStyleActionSheet);
if (options.actions) {
for (i = 0; i < options.actions.length; i++) {