fix: formaTime function date type logic error 修复formaTime 函数参数逻辑判断的问题 #19
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Signed-off-by: EthanShen [email protected]
Pre-Checklist
I have read through the readme document
My code has the necessary comments and tests
Description
this PR is to fix the timePicker.js file line 542 formatTime function parameter date judge logic error.
when date’s data type isn’t string, such as array or object type.
the sentence of ‘if’ judge sentence, date = new Date(date) is still executed, which may cause fatal error.
这个PR是为了解决timePicker.js文件中 formatTime函数 参数 date 逻辑判断错误的问题 当函数参数date的类型不是string或者number类型而是array 或者 object类型 if语句中 date = new Date(date) 的逻辑仍旧会执行 这将导致一些致命的后果
Related Issue
Close #18