Skip to content

Commit c8ab14b

Browse files
committed
fix(android): button fix for error after view was removed
1 parent 3a2e055 commit c8ab14b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/button/button.android.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,9 @@ export class Button extends ButtonBase {
118118
if (!this.createStateListAnimatorTimeout) {
119119
this.createStateListAnimatorTimeout = setTimeout(() => {
120120
this.createStateListAnimatorTimeout = null;
121-
createStateListAnimator(this, this.nativeViewProtected);
121+
if (this._context) {
122+
createStateListAnimator(this, this.nativeViewProtected);
123+
}
122124
});
123125
}
124126
}

0 commit comments

Comments
 (0)