Explorar el Código

Fixes an error with duplicate ids

main
Eric Amodio hace 2 años
padre
commit
58e4fb2d13
Se han modificado 1 ficheros con 5 adiciones y 1 borrados
  1. +5
    -1
      src/views/nodes/autolinkedItemsNode.ts

+ 5
- 1
src/views/nodes/autolinkedItemsNode.ts Ver fichero

@ -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[]> {

Cargando…
Cancelar
Guardar