Skip to content

Commit 1245713

Browse files
committed
fix(bottomsheet): android prevent crash on back button
1 parent da6168d commit 1245713

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/bottomsheet/bottomsheet.android.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,10 @@ export class ViewWithBottomSheet extends ViewWithBottomSheetBase {
6868
}
6969

7070
owner.notify(args);
71-
return args.cancel || owner.onBackPressed();
71+
if (!args.cancel) {
72+
args.cancel = owner.onBackPressed();
73+
}
74+
return args.cancel;
7275
}
7376
});
7477
const dialog = new com.nativescript.material.bottomsheet.BottomSheetDialog(fragment.getActivity(), theme);

0 commit comments

Comments
 (0)