Skip to content

Commit

Permalink
chore(module:modal): use variable to save classname string
Browse files Browse the repository at this point in the history
  • Loading branch information
hsuanxyz committed May 5, 2019
1 parent 6f5f215 commit e851ba6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion components/modal/nz-modal.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ import { ModalButtonOptions, ModalOptions, ModalType, OnClickCallback } from './
export const MODAL_ANIMATE_DURATION = 200; // Duration when perform animations (ms)

type AnimationState = 'enter' | 'leave' | null;
export const WRAP_CLASS_NAME = 'ant-modal-wrap';

@Component({
selector: 'nz-modal',
Expand Down Expand Up @@ -315,7 +316,7 @@ export class NzModalComponent<T = any, R = any> extends NzModalRef<T, R>
if (
this.mask &&
this.maskClosable &&
($event.target as HTMLElement).classList.contains('ant-modal-wrap') &&
($event.target as HTMLElement).classList.contains(WRAP_CLASS_NAME) &&
this.nzVisible &&
!this.dialogMouseDown
) {
Expand Down

0 comments on commit e851ba6

Please sign in to comment.