Permalink
Browse files

Fix isUnique() function on datamodel selection.

  • Loading branch information...
1 parent 536db10 commit 862dead06a79bba39301815d2547cfca802fa19d @cdujeu cdujeu committed Jul 1, 2016
Showing with 1 addition and 4 deletions.
  1. +1 −4 core/src/plugins/gui.ajax/res/js/es6/model/PydioDataModel.es6
@@ -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;
@@ -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];
@@ -555,7 +552,7 @@ class PydioDataModel extends Observable{
* @returns Boolean
*/
isUnique (){
- return this._bUnique;
+ return this._selectedNodes && this._selectedNodes.length === 1;
}
/**

0 comments on commit 862dead

Please sign in to comment.