17782: Fixes almost all tests (4 left) mostly by fixing namespace-type imports.
[arvados-workbench2.git] / src / store / collections / collection-partial-copy-actions.ts
index 6ac6c10f0b9f83c6b2c421de594df1b5aaf24df7..849716eb5b55f15e803d0be28633b49b8a6c3af5 100644 (file)
@@ -3,7 +3,7 @@
 // SPDX-License-Identifier: AGPL-3.0
 
 import { Dispatch } from 'redux';
-import * as _ from "lodash";
+import { difference } from "lodash";
 import { RootState } from 'store/store';
 import { FormErrors, initialize, startSubmit, stopSubmit } from 'redux-form';
 import { resetPickerProjectTree } from 'store/project-tree-picker/project-tree-picker-actions';
@@ -133,7 +133,7 @@ export const copyCollectionPartialToSelectedCollection = ({ collectionUuid }: Co
                         return;
                     }
                 });
-                const diffPathToRemove = _.difference(paths, pathsToRemove);
+                const diffPathToRemove = difference(paths, pathsToRemove);
                 await services.collectionService.deleteFiles(selectedCollection.uuid, pathsToRemove.map(path => path.replace(currentCollection.uuid, collectionUuid)));
                 const collectionWithDeletedFiles = await services.collectionService.get(collectionUuid);
                 await services.collectionService.update(collectionUuid, { manifestText: `${collectionWithDeletedFiles.manifestText}${(currentCollection.manifestText ? currentCollection.manifestText : currentCollection.unsignedManifestText) || ''}` });