Skip to content

Commit

Permalink
fix(module:dropdown): fix dropdown contextmenu (NG-ZORRO#3782)
Browse files Browse the repository at this point in the history
  • Loading branch information
vthinkxie authored and lppedd committed Jul 15, 2019
1 parent 8a19a7e commit b0943b5
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions components/dropdown/nz-context-menu.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,13 @@ export class NzContextMenuService {
}

close(): void {
this.overlayRef.detach();
this.setOpenState(false);
this.clickOutsideSubscription.unsubscribe();
this.clickMenuSubscription.unsubscribe();
this.positionSubscription.unsubscribe();
if (this.overlayRef) {
this.overlayRef.detach();
this.setOpenState(false);
this.clickOutsideSubscription.unsubscribe();
this.clickMenuSubscription.unsubscribe();
this.positionSubscription.unsubscribe();
}
}

private handleClickOutside(): void {
Expand Down

0 comments on commit b0943b5

Please sign in to comment.