Skip to content

Commit

Permalink
Update view.js (#1363)
Browse files Browse the repository at this point in the history
  • Loading branch information
lutzroeder committed Sep 22, 2024
1 parent abe90dc commit 78540e0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion source/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ view.View = class {
}

find() {
if (this._graph) {
if (this._graph && this._sidebar.peek() instanceof view.FindSidebar !== true) {
this._graph.select(null);
const sidebar = new view.FindSidebar(this, this.activeGraph, this.activeSignature);
sidebar.on('state-changed', (sender, state) => {
Expand Down Expand Up @@ -2477,6 +2477,10 @@ view.Sidebar = class {
this._update(this._stack.concat(entry));
}

peek() {
return this._stack.length > 0 ? this._stack[this._stack.length - 1].content : null;
}

_render(content) {
try {
content.render();
Expand Down

0 comments on commit 78540e0

Please sign in to comment.