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

请完善一下对undefined null ''等异常值的处理 #4

Closed
fengsx opened this issue Jul 22, 2016 · 0 comments
Closed

请完善一下对undefined null ''等异常值的处理 #4

fengsx opened this issue Jul 22, 2016 · 0 comments

Comments

@fengsx
Copy link

fengsx commented Jul 22, 2016

我现在的项目中用的是formatter@0.1.2。 现在的情况是这样的。如果date == undefined, 那么 Formatter.date(date, 'YYYY-MM-DD')的结果就是NaN-aN-aN。我希望在formatter的时候判断一下异常值,如果是异常值的话就返回空字符串。能报一下console.warn就更好啦

eternalsky pushed a commit that referenced this issue Jul 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants