Skip to content

Commit a9280a4

Browse files
committed
Update picker.ts
1 parent 4dde8e5 commit a9280a4

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

picker.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,11 @@ namespace kojac {
8585

8686
public onButtonClicked(icon: string) {
8787
this.opts.cursor.cancelHandlerStack.pop();
88-
if (this.opts.onClick) {
89-
this.opts.onClick(icon);
90-
}
88+
const onClick = this.opts.onClick;
9189
this.destroy();
90+
if (onClick) {
91+
onClick(icon);
92+
}
9293
}
9394

9495
private cancelClicked() {

0 commit comments

Comments
 (0)