File tree Expand file tree Collapse file tree 3 files changed +3
-9
lines changed Expand file tree Collapse file tree 3 files changed +3
-9
lines changed Original file line number Diff line number Diff line change 2525 "dependencies" : {
2626 "fast-equals" : " ^2.0.0" ,
2727 "jsondiffpatch" : " ^0.4.0" ,
28- "lodash.intersection" : " ^4.4.0" ,
2928 "lodash.shuffle" : " ^4.2.0" ,
3029 "lodash.sortby" : " ^4.7.0" ,
3130 "lodash.uniqwith" : " ^4.5.0"
Original file line number Diff line number Diff line change 1- /* eslint-disable max-len */
21import { ProductVariant } from '@commercetools/platform-sdk/src'
3- import intersection from 'lodash.intersection'
42import uniqWith from 'lodash.uniqwith'
53import actionsMapCustom from './utils/action-map-custom'
64import {
@@ -423,7 +421,9 @@ function _buildVariantChangeAssetOrderAction(
423421 const assetIdsCurrent = newVariant . assets
424422 . map ( ( _ ) => _ . id )
425423 . filter ( ( _ ) => _ !== undefined )
426- const assetIdsToKeep = intersection ( assetIdsCurrent , assetIdsBefore )
424+ const assetIdsToKeep = assetIdsCurrent . filter ( ( value ) =>
425+ assetIdsBefore . includes ( value )
426+ )
427427 const assetIdsToRemove = assetIdsBefore . filter (
428428 ( item ) => ! assetIdsToKeep . includes ( item )
429429 )
Original file line number Diff line number Diff line change @@ -6876,11 +6876,6 @@ lodash.debounce@^4.0.8:
68766876 resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af"
68776877 integrity sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==
68786878
6879- lodash.intersection@^4.4.0 :
6880- version "4.4.0"
6881- resolved "https://registry.yarnpkg.com/lodash.intersection/-/lodash.intersection-4.4.0.tgz#0a11ba631d0e95c23c7f2f4cbb9a692ed178e705"
6882- integrity sha512-N+L0cCfnqMv6mxXtSPeKt+IavbOBBSiAEkKyLasZ8BVcP9YXQgxLO12oPR8OyURwKV8l5vJKiE1M8aS70heuMg==
6883-
68846879lodash.isfunction@^3.0.9 :
68856880 version "3.0.9"
68866881 resolved "https://registry.yarnpkg.com/lodash.isfunction/-/lodash.isfunction-3.0.9.tgz#06de25df4db327ac931981d1bdb067e5af68d051"
You can’t perform that action at this time.
0 commit comments