Skip to content

Commit 630fd6d

Browse files
committed
fix(dialogs): missing return case
1 parent 7bd31ad commit 630fd6d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/dialogs/dialogs.android.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,7 @@ function showDialog(dlg: androidx.appcompat.app.AlertDialog, options: DialogOpti
160160
}
161161

162162
function prepareAndCreateAlertDialog(builder: androidx.appcompat.app.AlertDialog.Builder, options: ConfirmOptions & MDCAlertControlerOptions, callback?: Function, validationArgs?: (r) => any) {
163-
if (!options) {
164-
return;
165-
}
163+
166164
// onDismiss will always be called. Prevent calling callback multiple times
167165
let onDoneCalled = false;
168166
const onDone = function (result: boolean, dialog?: android.content.DialogInterface) {
@@ -198,6 +196,9 @@ function prepareAndCreateAlertDialog(builder: androidx.appcompat.app.AlertDialog
198196
})
199197
);
200198
const dlg = builder.create();
199+
if (!options) {
200+
return dlg;
201+
}
201202

202203
if (options.okButtonText) {
203204
dlg.setButton(

0 commit comments

Comments
 (0)