Skip to content

Commit

Permalink
Prevenitng redundant method calls on value property when initialized …
Browse files Browse the repository at this point in the history
…with an empty string(master) (#3042)

* fix(date-picker): Prevenitng redundant method calls on value. #3021

* fix(date-picker): Changing the check for value property on selection. #3021
  • Loading branch information
Hristo Popov authored and kdinev committed Nov 22, 2018
1 parent c8fee22 commit 74fc3cc
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ export class IgxDatePickerComponent implements ControlValueAccessor, EditorProvi
* @hidden
*/
public handleSelection(date: Date) {
if (this.value !== null && this.value !== undefined) {
if (this.value) {
date.setHours(this.value.getHours());
date.setMinutes(this.value.getMinutes());
date.setSeconds(this.value.getSeconds());
Expand Down

0 comments on commit 74fc3cc

Please sign in to comment.