You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2022/04/25 02:59:50 UTC

[GitHub] [dolphinscheduler] Amy0104 commented on a diff in pull request #9735: [Fix] add resource capacity required rule

Amy0104 commented on code in PR #9735:
URL: https://github.com/apache/dolphinscheduler/pull/9735#discussion_r857228449


##########
dolphinscheduler-ui-next/src/common/common.ts:
##########
@@ -314,10 +314,14 @@ export const warningTypeList = [
   }
 ]
 
-export const parseTime = (dateTime: string | number) => {
-  if (_.isString(dateTime) === true) {
-    return parseISO(dateTime as string)
-  } else {
-    return new Date(dateTime)
-  }
+export const parseTime = (dateTime: string | number): Date => {
+  return _.isString(dateTime) === true
+    ? parseISO(dateTime as string)
+    : new Date(dateTime)
+}
+
+export const renderTableTime = (
+  dateTime: string | number | null | undefined

Review Comment:
   It is better to use '?.' than '| undefined'.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org