diff --git a/memory-viz/src/automate.ts b/memory-viz/src/automate.ts index 87c1e6e9..abf8bdda 100644 --- a/memory-viz/src/automate.ts +++ b/memory-viz/src/automate.ts @@ -353,12 +353,7 @@ function compareByHeight(a: DrawnEntity, b: DrawnEntity): number { * @returns {number} negative if 'a.id' is larger, 0 if a.id == b.id, and positive if 'b.id' is larger. */ function compareByID(a: DrawnEntity, b: DrawnEntity): number { - if (typeof a.id === "number" && typeof b.id === "number") { - return a.id - b.id; - } - if (typeof a.id === "string" && typeof b.id === "string") { - return a.id.localeCompare(b.id); - } + return a.id - b.id; } /** diff --git a/memory-viz/src/types.ts b/memory-viz/src/types.ts index b51f487f..fa08bc37 100644 --- a/memory-viz/src/types.ts +++ b/memory-viz/src/types.ts @@ -8,7 +8,7 @@ export interface DrawnEntity { type?: string; x?: number; y?: number; - id?: number | string | null; + id?: number | null; value?: any; show_indexes?: boolean; style?: Styles;