Skip to content

Commit

Permalink
fix 第一个选框不使用接口,空值也会触发
Browse files Browse the repository at this point in the history
  • Loading branch information
ciaoca committed Sep 26, 2017
1 parent 8243736 commit 59e8988
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions js/jquery.cxselect.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* jQuery cxSelect
* @name jquery.cxselect.js
* @version 1.4.2
* @date 2016-02-27
* @date 2017-09-26
* @author ciaoca
* @email [email protected]
* @site https://github.com/ciaoca/cxSelect
Expand Down Expand Up @@ -229,7 +229,7 @@

if (self.settings.data || (typeof self.selectArray[0].data('url') === 'string' && self.selectArray[0].data('url').length)) {
cxSelect.getOptionData.call(self, 0);
} else if (self.selectArray[0][0].options.length && typeof self.selectArray[0].attr('data-value') === 'string') {
} else if (self.selectArray[0][0].options.length && typeof self.selectArray[0].attr('data-value') === 'string' && self.selectArray[0].data('data-value').length) {
self.selectArray[0].val(self.selectArray[0].attr('data-value'));
cxSelect.getOptionData.call(self, 1);
} else {
Expand Down
4 changes: 2 additions & 2 deletions js/jquery.cxselect.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 59e8988

Please sign in to comment.