Skip to content

Commit

Permalink
Merge pull request #364 from kaola-fed/hotfix2018080fixBug
Browse files Browse the repository at this point in the history
🐛  修复selected为null时报错的bug
  • Loading branch information
smallcosmos authored Aug 14, 2018
2 parents 46a8e08 + 51533b0 commit 8a4910d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/js/components/form/KLSelect/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<kl-icon fontSize=15 type="error" on-click={this.clearContent($event)} class="kl-icon-remove-addclass "/>
</div>
{/if}
{#if tags && selected.length > 0}
{#if tags && selected && selected.length > 0}
<span class="kl-select__tag" >
{selected[0]['name']}
<kl-icon type="cross" is-dis={selected.disabled} on-click={this.removeSelected(selected,0,$event)} />
Expand Down Expand Up @@ -63,7 +63,7 @@
<kl-scroll wrapMaxHeight="200px">
<ul>
{#if placeholder}
<li is-hover={key_index == -1} class="kl-listview-item" is-sel={multiple?!selected.length:!selected} on-click={this.select(undefined)}>
<li is-hover={key_index == -1} class="kl-listview-item" is-sel={multiple?(!selected || !selected.length):!selected} on-click={this.select(undefined)}>
{placeholder}
</li>
{/if}
Expand Down

0 comments on commit 8a4910d

Please sign in to comment.