Airblader commented on a change in pull request #17808:
URL: https://github.com/apache/flink/pull/17808#discussion_r750476530
##########
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:
Yes, we are. Note that `undefined > …`, `… > undefined` and `undefined >
undefined` are all "valid" in the sense that they don't error, so we're not
running into the problem of possibly causing errors here (the behavior was
pre-existent anyway, now it's just visible).
--
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]