diff --git a/web/src/engine/predictive-text/worker-thread/src/main/correction/search-quotient-spur.ts b/web/src/engine/predictive-text/worker-thread/src/main/correction/search-quotient-spur.ts index 079b310478..56945fa2c1 100644 --- a/web/src/engine/predictive-text/worker-thread/src/main/correction/search-quotient-spur.ts +++ b/web/src/engine/predictive-text/worker-thread/src/main/correction/search-quotient-spur.ts @@ -530,9 +530,7 @@ export abstract class SearchQuotientSpur extends SearchQuotientNode { * ancestry properly handle quotient-path variance in unit tests. */ get edgeKey(): string { - const inputSrc = this.inputSource; - const segment = inputSrc.segment; - return `E${inputSrc.subsetId}:${segment.start}${segment.end !== undefined ? `-${segment.end}` : ''}`; + return `E${this.inputSource?.subsetId ?? ''}:${this.splitClusteringKey}`; } isSameNode(space: SearchQuotientNode): boolean { @@ -559,11 +557,7 @@ export abstract class SearchQuotientSpur extends SearchQuotientNode { // Used to identify cluster-compatible components of SearchPaths during SearchCluster split operations. get splitClusteringKey(): string { - const pathSrc = this.inputSource; - if(!pathSrc) { - return ''; - } - - return `${pathSrc.segment.start}${pathSrc.segment.end == undefined ? '' : `-${pathSrc.segment.end}`}`; + const spurSeg = this.inputSource?.segment; + return `${spurSeg?.start ?? 0}${spurSeg?.end == undefined ? '' : `-${spurSeg.end}`}`; } }