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

Check value emptiness in LocalTimePipe #218

Open
nealyip opened this issue Sep 25, 2019 · 1 comment
Open

Check value emptiness in LocalTimePipe #218

nealyip opened this issue Sep 25, 2019 · 1 comment
Labels

Comments

@nealyip
Copy link

nealyip commented Sep 25, 2019

just like the way DateFormatPipe does,

if (!value) { return ‘’; }

@urish urish added good first issue Good for newcomers help wanted labels Sep 29, 2019
@camillef
Copy link

camillef commented Oct 7, 2019

Since amLocal currently always returns a Moment object, I'm not it should return '' if given an empty value.

Is the problem that https://github.com/urish/ngx-moment#amlocal-pipe returns 'Invalid date' when given an empty input? Maybe instead, amDateFormat should return '' if given an invalid Moment object

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants