nicoweidner commented on a change in pull request #17808:
URL: https://github.com/apache/flink/pull/17808#discussion_r750493966



##########
File path: 
flink-runtime-web/web-dashboard/src/app/pages/job/overview/list/job-overview-list.component.ts
##########
@@ -16,12 +16,17 @@
  * limitations under the License.
  */
 
-import { Component, EventEmitter, Input, Output, ChangeDetectionStrategy, 
ElementRef } from '@angular/core';
+import { ChangeDetectionStrategy, Component, ElementRef, EventEmitter, Input, 
Output } from '@angular/core';
 
 import { NzTableSortFn } from 'ng-zorro-antd/table/src/table.types';
 
 import { NodesItemCorrectInterface } from 'interfaces';
-import { deepFind } from 'utils';
+
+function createSortFn(
+  selector: (item: NodesItemCorrectInterface) => number | string | undefined
+): NzTableSortFn<NodesItemCorrectInterface> {
+  return (pre, next) => (selector(pre)! > selector(next)! ? 1 : -1);

Review comment:
       Maybe we could just return -1 whenever any of the values is undefined? 
That should have the same effect and be (a little bit) less awkward




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to