Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevenitng redundant method calls on value property when initialized with an empty string(master) #3042

Merged
merged 8 commits into from
Nov 22, 2018

Conversation

HristoP96
Copy link

Closes #3021 .

@HristoP96 HristoP96 added 🐛 bug Any issue that describes a bug ❌ status: awaiting-test PRs awaiting manual verification 📅 date-picker labels Nov 19, 2018
@zdrawku zdrawku requested a review from ddincheva November 20, 2018 13:07
@zdrawku zdrawku removed the request for review from hanastasov November 20, 2018 13:07
@ddincheva ddincheva added 💥 status: in-test PRs currently being tested and removed ❌ status: awaiting-test PRs awaiting manual verification labels Nov 20, 2018
@ddincheva ddincheva added ✅ status: verified Applies to PRs that have passed manual verification and removed 💥 status: in-test PRs currently being tested labels Nov 21, 2018
ddincheva
ddincheva previously approved these changes Nov 21, 2018
@@ -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 !== null && this.value !== undefined && (this.value as any) !== '') {
Copy link
Member

@kdinev kdinev Nov 21, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just do a check if this.value !== ''. In fact, just change this to a truthy check if (this.value)

@kdinev kdinev merged commit 74fc3cc into master Nov 22, 2018
@kdinev kdinev deleted the hPopov/fix-issue-3021/master branch November 22, 2018 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Any issue that describes a bug 📅 date-picker version: 7.0.x ✅ status: verified Applies to PRs that have passed manual verification
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants