Quellcode durchsuchen

Fixes an error with duplicate ids

main
Eric Amodio vor 2 Jahren
Ursprung
Commit
58e4fb2d13
1 geänderte Dateien mit 5 neuen und 1 gelöschten Zeilen
  1. +5
    -1
      src/views/nodes/autolinkedItemsNode.ts

+ 5
- 1
src/views/nodes/autolinkedItemsNode.ts Datei anzeigen

@ -20,8 +20,11 @@ export interface FilesQueryResults {
};
}
let instanceId = 0;
export class AutolinkedItemsNode extends ViewNode<ViewsWithCommits> {
private _children: ViewNode[] | undefined;
private _instanceId: number;
constructor(
view: ViewsWithCommits,
@ -31,10 +34,11 @@ export class AutolinkedItemsNode extends ViewNode {
public readonly log: GitLog,
) {
super(GitUri.fromRepoPath(repoPath), view, parent);
this._instanceId = instanceId++;
}
override get id(): string {
return `${this.parent!.id}:results:autolinked`;
return `${this.parent!.id}:results:autolinked:${this._instanceId}`;
}
async getChildren(): Promise<ViewNode[]> {

Laden…
Abbrechen
Speichern