This is an automated email from the ASF dual-hosted git repository.

xtsong pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git


The following commit(s) were added to refs/heads/master by this push:
     new e07545e458b [FLINK-33938][runtime-web] Correct implicit coercions in 
relational operators to adopt typescript 5.0
e07545e458b is described below

commit e07545e458bd22099244a353ac29477ca3a13811
Author: Laffery <laffer...@gmail.com>
AuthorDate: Tue Dec 26 11:04:10 2023 +0800

    [FLINK-33938][runtime-web] Correct implicit coercions in relational 
operators to adopt typescript 5.0
    
    This closes #23999
---
 .../src/app/components/dagre/components/node/node.component.ts          | 2 +-
 .../web-dashboard/src/app/components/humanize-date.pipe.ts              | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/flink-runtime-web/web-dashboard/src/app/components/dagre/components/node/node.component.ts
 
b/flink-runtime-web/web-dashboard/src/app/components/dagre/components/node/node.component.ts
index b862b63777a..368a7053603 100644
--- 
a/flink-runtime-web/web-dashboard/src/app/components/dagre/components/node/node.component.ts
+++ 
b/flink-runtime-web/web-dashboard/src/app/components/dagre/components/node/node.component.ts
@@ -80,7 +80,7 @@ export class NodeComponent {
   }
 
   isValid = (value?: number): boolean => {
-    return !!value || value === 0 || value === NaN;
+    return value === undefined || value === 0 || isNaN(value);
   };
 
   toRGBA = (d: string): number[] => {
diff --git 
a/flink-runtime-web/web-dashboard/src/app/components/humanize-date.pipe.ts 
b/flink-runtime-web/web-dashboard/src/app/components/humanize-date.pipe.ts
index ee76a0acbb8..d303dbe700e 100644
--- a/flink-runtime-web/web-dashboard/src/app/components/humanize-date.pipe.ts
+++ b/flink-runtime-web/web-dashboard/src/app/components/humanize-date.pipe.ts
@@ -32,7 +32,7 @@ export class HumanizeDatePipe implements PipeTransform {
     timezone?: string,
     locale?: string
   ): string | null | undefined {
-    if (value == null || value === '' || value !== value || value < 0) {
+    if (value == null || value === '' || value !== value || +value < 0) {
       return '–';
     }
 

Reply via email to