Skip to content

Commit

Permalink
fix(module:select): option item not selected with falsy value (#5264)
Browse files Browse the repository at this point in the history
  • Loading branch information
diyews authored May 13, 2020
1 parent ca7314c commit 1c4d7d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/select/option-item.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export class NzOptionItemComponent implements OnChanges {
ngOnChanges(changes: SimpleChanges): void {
const { value, activatedValue, listOfSelectedValue } = changes;
if (value || listOfSelectedValue) {
this.selected = this.listOfSelectedValue.find(v => this.compareWith(v, this.value));
this.selected = this.listOfSelectedValue.some(v => this.compareWith(v, this.value));
}
if (value || activatedValue) {
this.activated = this.compareWith(this.activatedValue, this.value);
Expand Down

0 comments on commit 1c4d7d8

Please sign in to comment.