File tree Expand file tree Collapse file tree 3 files changed +10
-12
lines changed Expand file tree Collapse file tree 3 files changed +10
-12
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.sortby" : " ^4.7.0" ,
29- "lodash.uniqwith" : " ^4.5.0"
28+ "lodash.sortby" : " ^4.7.0"
3029 },
3130 "files" : [" dist" , " CHANGELOG.md" ],
3231 "author" : " Nicola Molinari <nicola.molinari@commercetools.com> (https://github.com/emmenko)" ,
Original file line number Diff line number Diff line change 11import { ProductVariant } from '@commercetools/platform-sdk/src'
2- import uniqWith from 'lodash.uniqwith'
32import actionsMapCustom from './utils/action-map-custom'
43import {
54 buildBaseAttributesActions ,
@@ -701,10 +700,15 @@ export function actionsMapAttributes(
701700
702701 // Ensure that an action is unique.
703702 // This is especially necessary for SFA attributes.
704- return uniqWith (
705- actions ,
706- ( a , b ) =>
707- a . action === b . action && a . name === b . name && a . variantId === b . variantId
703+ return actions . filter (
704+ ( b , index , self ) =>
705+ index ===
706+ self . findIndex (
707+ ( a ) =>
708+ a . action === b . action &&
709+ a . name === b . name &&
710+ a . variantId === b . variantId
711+ )
708712 )
709713}
710714
Original file line number Diff line number Diff line change @@ -6926,11 +6926,6 @@ lodash.uniq@^4.5.0:
69266926 resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773"
69276927 integrity sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ==
69286928
6929- lodash.uniqwith@^4.5.0 :
6930- version "4.5.0"
6931- resolved "https://registry.yarnpkg.com/lodash.uniqwith/-/lodash.uniqwith-4.5.0.tgz#7a0cbf65f43b5928625a9d4d0dc54b18cadc7ef3"
6932- integrity sha512-7lYL8bLopMoy4CTICbxygAUq6CdRJ36vFc80DucPueUee+d5NBRxz3FdT9Pes/HEx5mPoT9jwnsEJWz1N7uq7Q==
6933-
69346929lodash.upperfirst@^4.3.1 :
69356930 version "4.3.1"
69366931 resolved "https://registry.yarnpkg.com/lodash.upperfirst/-/lodash.upperfirst-4.3.1.tgz#1365edf431480481ef0d1c68957a5ed99d49f7ce"
You can’t perform that action at this time.
0 commit comments