From 48dd8ebf00ad9ee05e3c37540aca7aa1407bd6bc Mon Sep 17 00:00:00 2001 From: 梁灏 Date: Wed, 22 Feb 2017 14:39:54 +0800 Subject: [PATCH] update Modal --- src/components/modal/modal.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/modal/modal.vue b/src/components/modal/modal.vue index 0ace491..51a529b 100644 --- a/src/components/modal/modal.vue +++ b/src/components/modal/modal.vue @@ -132,7 +132,8 @@ }, handleWrapClick (event) { // use indexOf,do not use === ,because ivu-modal-wrap can have other custom className - if (event.target.getAttribute('class').indexOf(`${prefixCls}-wrap`) > -1) this.mask(); + const className = event.target.getAttribute('class'); + if (className && className.indexOf(`${prefixCls}-wrap`) > -1) this.mask(); }, cancel () { this.close(); -- libgit2 0.21.4