Skip to content

Commit

Permalink
Avoids multiple calls to id
Browse files Browse the repository at this point in the history
  • Loading branch information
eamodio committed Sep 5, 2022
1 parent 90f465a commit 04666c2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/views/nodes/viewNode.ts
Expand Up @@ -95,7 +95,8 @@ export abstract class ViewNode<TView extends View = View, State extends object =
toClipboard?(): string;

toString(): string {
return `${Logger.toLoggableName(this)}${this.id != null ? `(${this.id})` : ''}`;
const id = this.id;
return `${Logger.toLoggableName(this)}${id != null ? `(${id})` : ''}`;
}

protected _uri: GitUri;
Expand Down

0 comments on commit 04666c2

Please sign in to comment.