Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Fix isUnique() function in datamodel.
Browse files Browse the repository at this point in the history
  • Loading branch information
cdujeu committed Jul 4, 2016
1 parent 4877ba3 commit 5337361
Showing 1 changed file with 1 addition and 4 deletions.
Expand Up @@ -34,7 +34,6 @@ class PydioDataModel extends Observable{
this._bEmpty = true;
this._globalEvents = !localEvents;

this._bUnique= false;
this._bFile= false;
this._bDir= false;
this._isRecycle= false;
Expand Down Expand Up @@ -460,10 +459,8 @@ class PydioDataModel extends Observable{
this._selectedNodes = ajxpDataNodes;
this._bEmpty = ((ajxpDataNodes && ajxpDataNodes.length)?false:true);
this._bFile = this._bDir = this._isRecycle = false;
this._bUnique = false;
if(!this._bEmpty)
{
this._bUnique = (ajxpDataNodes.length == 1);
for(var i=0; i<ajxpDataNodes.length; i++)
{
var selectedNode = ajxpDataNodes[i];
Expand Down Expand Up @@ -555,7 +552,7 @@ class PydioDataModel extends Observable{
* @returns Boolean
*/
isUnique (){
return this._bUnique;
return this._selectedNodes && this._selectedNodes.length === 1;
}

/**
Expand Down

0 comments on commit 5337361

Please sign in to comment.