Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
mehmetcetin01140 committed Jun 11, 2024
1 parent ff394b2 commit d762804
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/app/components/tree/tree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1369,14 +1369,9 @@ export class Tree implements OnInit, AfterContentInit, OnChanges, OnDestroy, Blo
onNodeRightClick(event: MouseEvent, node: TreeNode<any>) {
if (this.contextMenu) {
let eventTarget = <Element>event.target;
let className;
let className = eventTarget.getAttribute('class');

if (eventTarget instanceof SVGElement) {
className = eventTarget.getAttribute('class');
} else {
className = eventTarget.className;
}
if (className && className.indexOf('p-tree-toggler') === 0) {
if (className && className.includes('p-tree-toggler')) {
return;
} else {
let index = this.findIndexInSelection(node);
Expand Down

0 comments on commit d762804

Please sign in to comment.