chore: cleanup

This commit is contained in:
Nathan Walker
2020-07-23 14:03:37 -07:00
parent 6d039909af
commit 1e6fccf272
1534 changed files with 45656 additions and 45945 deletions

View File

@@ -271,14 +271,16 @@ class TapHandlerImpl extends NSObject {
public static initWithOwner(owner: WeakRef<Button>): TapHandlerImpl {
let handler = <TapHandlerImpl>TapHandlerImpl.new();
handler._owner = owner;
return handler;
}
public tap(args) {
let owner = this._owner.get();
if (owner) {
owner._emit(ButtonBase.tapEvent);
// _owner is a {N} view which could get destroyed when a tap initiates (protect!)
if (this._owner) {
let owner = this._owner.get();
if (owner) {
owner._emit(ButtonBase.tapEvent);
}
}
}