浏览代码

Fixes an error with duplicate ids

main
Eric Amodio 2 年前
父节点
当前提交
58e4fb2d13
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. +5
    -1
      src/views/nodes/autolinkedItemsNode.ts

+ 5
- 1
src/views/nodes/autolinkedItemsNode.ts 查看文件

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

正在加载...
取消
保存