@@ -154,8 +154,8 @@ export class ViewWithBottomSheet extends ViewWithBottomSheetBase {
154
154
const color = owner . backgroundColor ;
155
155
const contentViewId = getId ( 'design_bottom_sheet' ) ;
156
156
const view = fragment . getDialog ( ) . findViewById ( contentViewId ) ;
157
- const transparent = bottomSheetOptions . options && bottomSheetOptions . options . transparent ;
158
- if ( transparent === true ) {
157
+ const transparent = bottomSheetOptions . options ?. transparent === true ;
158
+ if ( transparent ) {
159
159
// we need delay it just a bit or it wont work
160
160
setTimeout ( ( ) => {
161
161
view . setBackground ( null ) ;
@@ -164,15 +164,15 @@ export class ViewWithBottomSheet extends ViewWithBottomSheetBase {
164
164
165
165
const behavior = com . google . android . material . bottomsheet . BottomSheetBehavior . from ( view ) ;
166
166
// prevent hiding the bottom sheet by
167
- const dismissOnDraggingDownSheet = ! bottomSheetOptions . options || bottomSheetOptions . options . dismissOnDraggingDownSheet !== false ;
167
+ const dismissOnDraggingDownSheet = bottomSheetOptions . options ? .dismissOnDraggingDownSheet !== false ;
168
168
behavior . setHideable ( dismissOnDraggingDownSheet ) ;
169
169
if ( ! dismissOnDraggingDownSheet ) {
170
170
// directly expand the bottom sheet after start
171
171
behavior . setState ( com . google . android . material . bottomsheet . BottomSheetBehavior . STATE_EXPANDED ) ;
172
172
// set to maximum possible value to prevent dragging the sheet between peek and expanded height
173
173
behavior . setPeekHeight ( java . lang . Integer . MAX_VALUE ) ;
174
174
}
175
- const skipCollapsedState = ! bottomSheetOptions . options || bottomSheetOptions . options . skipCollapsedState === true ;
175
+ const skipCollapsedState = bottomSheetOptions . options ? .skipCollapsedState === true ;
176
176
if ( skipCollapsedState ) {
177
177
// directly expand the bottom sheet after start
178
178
behavior . setState ( com . google . android . material . bottomsheet . BottomSheetBehavior . STATE_EXPANDED ) ;
0 commit comments