Skip to content

Commit

Permalink
Merge branch 'main' into select-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenthoms authored Oct 27, 2023
2 parents c141e0c + 88a75cc commit 3e8083a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ export class Tag extends React.Component<TagProps> {
return "Incomplete";
} else {
const exactlyMatchedNodePaths = nodeSelection.exactlyMatchedNodePaths();
if (exactlyMatchedNodePaths.length === -1 || exactlyMatchedNodePaths.length <= maxNumSelectedNodes) {
if (maxNumSelectedNodes === -1 || exactlyMatchedNodePaths.length <= maxNumSelectedNodes) {
return exactlyMatchedNodePaths.join("\n");
}
return `Matched ${exactlyMatchedNodePaths.length} node${
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1671,7 +1671,9 @@ export class SmartNodeSelectorComponent extends React.Component<SmartNodeSelecto
maxNumSelectedNodes={numSelectedNodes === -1 ? -1 : numSelectedNodes}
/>
);
numSelectedNodes -= selection.numberOfExactlyMatchedNodes();
if (maxNumSelectedNodes !== -1) {
numSelectedNodes -= selection.numberOfExactlyMatchedNodes();
}
return tag;
})}
</ul>
Expand Down

0 comments on commit 3e8083a

Please sign in to comment.