File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -56,8 +56,8 @@ export class SnackBar extends SnackBarBase {
56
56
attachView = modalViews [ modalViews . length - 1 ] as View ;
57
57
}
58
58
}
59
- const page = attachView instanceof Page ? attachView : attachView . page ;
60
- let nView = ( page . nativeViewProtected as android . view . View ) . getParent ( ) ;
59
+ const page = ( attachView instanceof Page ? attachView : attachView . page ) || attachView ;
60
+ let nView = page instanceof Page ? ( page . nativeViewProtected as android . view . View ) . getParent ( ) : attachView . nativeViewProtected ;
61
61
let nCoordinatorLayout : androidx . coordinatorlayout . widget . CoordinatorLayout = ( page as any ) . nCoordinatorLayout ;
62
62
if ( ! nCoordinatorLayout && ! ( nView instanceof androidx . coordinatorlayout . widget . CoordinatorLayout ) && nView instanceof android . view . ViewGroup ) {
63
63
nCoordinatorLayout = new androidx . coordinatorlayout . widget . CoordinatorLayout ( attachView . _context ) ;
@@ -76,7 +76,7 @@ export class SnackBar extends SnackBarBase {
76
76
77
77
nView = nCoordinatorLayout ;
78
78
}
79
- this . _snackbar = com . google . android . material . snackbar . Snackbar . make ( nView as any , options . message , options . hideDelay ) ;
79
+ this . _snackbar = com . google . android . material . snackbar . Snackbar . make ( nView , options . message , options . hideDelay ) ;
80
80
if ( options . anchorView ) {
81
81
this . _snackbar . setAnchorView ( options . anchorView . nativeViewProtected ) ;
82
82
}
You can’t perform that action at this time.
0 commit comments