Skip to content
This repository has been archived by the owner on Dec 21, 2021. It is now read-only.

Commit

Permalink
AUI-1114 Check boolean first than dom operations for performance
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardolundgren committed Jan 16, 2014
1 parent 4141f92 commit a1f6801
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/aui-tree/js/aui-tree-view.js
Expand Up @@ -783,7 +783,7 @@ var TreeViewDD = A.Component.create({
// cannot drop the dragged element into any of its children
// nor above an undraggable element
// using DOM contains method for performance reason
if (!dragNode.contains(dropNode) && !!dropTreeNode.get(DRAGGABLE)) {
if (!!dropTreeNode.get(DRAGGABLE) && !dragNode.contains(dropNode)) {
// nArea splits the height in 3 areas top/center/bottom these
// areas are responsible for defining the state when the mouse
// is over any of them
Expand Down

0 comments on commit a1f6801

Please sign in to comment.