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 {
5656 attachView = modalViews [ modalViews . length - 1 ] as View ;
5757 }
5858 }
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 ;
6161 let nCoordinatorLayout : androidx . coordinatorlayout . widget . CoordinatorLayout = ( page as any ) . nCoordinatorLayout ;
6262 if ( ! nCoordinatorLayout && ! ( nView instanceof androidx . coordinatorlayout . widget . CoordinatorLayout ) && nView instanceof android . view . ViewGroup ) {
6363 nCoordinatorLayout = new androidx . coordinatorlayout . widget . CoordinatorLayout ( attachView . _context ) ;
@@ -76,7 +76,7 @@ export class SnackBar extends SnackBarBase {
7676
7777 nView = nCoordinatorLayout ;
7878 }
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 ) ;
8080 if ( options . anchorView ) {
8181 this . _snackbar . setAnchorView ( options . anchorView . nativeViewProtected ) ;
8282 }
You can’t perform that action at this time.
0 commit comments