We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 96c222d commit bd506bcCopy full SHA for bd506bc
src/snackbar/snackbar.android.ts
@@ -150,7 +150,11 @@ export class SnackBar extends SnackBarBase {
150
}
151
(cb as any).nListener = null;
152
if (nCoordinatorLayout) {
153
- (nCoordinatorLayout.getParent() as android.view.ViewGroup).removeView(nCoordinatorLayout);
+ const parent = nCoordinatorLayout.getParent() as android.view.ViewGroup;
154
+ // in case of the view being in background the parent might already be null
155
+ if (parent) {
156
+ parent.removeView(nCoordinatorLayout);
157
+ }
158
(page as any).nCoordinatorLayout = null;
159
160
},
0 commit comments