Here is a function I am working with:
$scope.doPaste = function(destination) {
if ($scope.selectCopy.ids != []) {
console.log("will copy");
$scope.CopyFiles(destination);
}
if ($scope.selectMove.ids != []) {
console.log("will move");
$scope.MoveFiles(destination);
}
};
In my application, it is not possible for both $scope.selectMove.ids
and $scope.selectCopy.ids
to be non-empty simultaneously. For example, when $scope.selectMove.ids
has values, $scope.selectCopy.ids
should be empty.
The issue I'm facing is that in the console, I always see messages indicating both "will copy" and "will move" regardless of the conditions.