mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2024-11-28 16:36:46 +00:00
[Tables] Check for undefined before compare (#561)
This commit is contained in:
parent
909a9fa522
commit
c43e24061c
@ -1,22 +1,21 @@
|
|||||||
import * as ko from "knockout";
|
import * as ko from "knockout";
|
||||||
import * as _ from "underscore";
|
|
||||||
import Q from "q";
|
import Q from "q";
|
||||||
|
import * as _ from "underscore";
|
||||||
|
import { Areas } from "../../../Common/Constants";
|
||||||
|
import * as ViewModels from "../../../Contracts/ViewModels";
|
||||||
import { Action } from "../../../Shared/Telemetry/TelemetryConstants";
|
import { Action } from "../../../Shared/Telemetry/TelemetryConstants";
|
||||||
import { CassandraTableKey, CassandraAPIDataClient } from "../TableDataClient";
|
import * as TelemetryProcessor from "../../../Shared/Telemetry/TelemetryProcessor";
|
||||||
import DataTableViewModel from "./DataTableViewModel";
|
import QueryTablesTab from "../../Tabs/QueryTablesTab";
|
||||||
import * as DataTableUtilities from "./DataTableUtilities";
|
import * as Constants from "../Constants";
|
||||||
import { getQuotedCqlIdentifier } from "../CqlUtilities";
|
import { getQuotedCqlIdentifier } from "../CqlUtilities";
|
||||||
|
import * as Entities from "../Entities";
|
||||||
|
import { CassandraAPIDataClient, CassandraTableKey } from "../TableDataClient";
|
||||||
|
import * as TableEntityProcessor from "../TableEntityProcessor";
|
||||||
|
import * as Utilities from "../Utilities";
|
||||||
|
import * as DataTableUtilities from "./DataTableUtilities";
|
||||||
|
import DataTableViewModel from "./DataTableViewModel";
|
||||||
import TableCommands from "./TableCommands";
|
import TableCommands from "./TableCommands";
|
||||||
import TableEntityCache from "./TableEntityCache";
|
import TableEntityCache from "./TableEntityCache";
|
||||||
import * as Constants from "../Constants";
|
|
||||||
import { Areas } from "../../../Common/Constants";
|
|
||||||
import * as Utilities from "../Utilities";
|
|
||||||
import * as Entities from "../Entities";
|
|
||||||
import QueryTablesTab from "../../Tabs/QueryTablesTab";
|
|
||||||
import * as TableEntityProcessor from "../TableEntityProcessor";
|
|
||||||
import * as TelemetryProcessor from "../../../Shared/Telemetry/TelemetryProcessor";
|
|
||||||
import * as ViewModels from "../../../Contracts/ViewModels";
|
|
||||||
|
|
||||||
interface IListTableEntitiesSegmentedResult extends Entities.IListTableEntitiesResult {
|
interface IListTableEntitiesSegmentedResult extends Entities.IListTableEntitiesResult {
|
||||||
ExceedMaximumRetries?: boolean;
|
ExceedMaximumRetries?: boolean;
|
||||||
@ -354,8 +353,8 @@ export default class TableEntityListViewModel extends DataTableViewModel {
|
|||||||
itemB = new Date(<string>(<any>rowB[col])._);
|
itemB = new Date(<string>(<any>rowB[col])._);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
itemA = <string>(<any>rowA[col])._.toLowerCase();
|
itemA = <string>(<any>rowA[col])._?.toLowerCase();
|
||||||
itemB = <string>(<any>rowB[col])._.toLowerCase();
|
itemB = <string>(<any>rowB[col])._?.toLowerCase();
|
||||||
}
|
}
|
||||||
var compareResult: number = itemA < itemB ? -1 : itemA > itemB ? 1 : 0;
|
var compareResult: number = itemA < itemB ? -1 : itemA > itemB ? 1 : 0;
|
||||||
if (compareResult !== 0) {
|
if (compareResult !== 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user