File tree 4 files changed +7
-6
lines changed
AttributionPanels/AttributionsPanel/LinkButton
4 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ export const LinkButton: React.FC<PackagesPanelChildrenProps> = ({
34
34
aria-label = { text . packageLists . linkAsAttribution }
35
35
disabled = {
36
36
isSelectedResourceBreakpoint ||
37
+ ! selectedAttributionIds . length ||
37
38
isPackageInfoModified ||
38
39
activeRelation === 'resource' ||
39
40
! ! attributionIdsForReplacement . length
Original file line number Diff line number Diff line change @@ -117,9 +117,9 @@ export const ConfirmDeletePopup: React.FC<Props> = ({
117
117
} ) }
118
118
</ MuiTypography >
119
119
< CardList
120
- data = { attributionIdsToDelete }
120
+ data = { attributionIdsToDelete . filter ( ( id ) => id in attributions ) }
121
121
renderItemContent = { ( attributionId , { index } ) => {
122
- if ( ! attributionId || ! ( attributionId in attributions ) ) {
122
+ if ( ! attributions [ attributionId ] ) {
123
123
return null ;
124
124
}
125
125
Original file line number Diff line number Diff line change @@ -96,10 +96,10 @@ export const ConfirmReplacePopup = ({
96
96
) }
97
97
</ MuiTypography >
98
98
< CardList
99
- data = { attributionIdsForReplacement }
99
+ data = { attributionIdsForReplacement . filter ( ( id ) => id in attributions ) }
100
100
data-testid = { 'removed-attributions' }
101
101
renderItemContent = { ( attributionId , { index } ) => {
102
- if ( ! attributionId || ! ( attributionId in attributions ) ) {
102
+ if ( ! attributions [ attributionId ] ) {
103
103
return null ;
104
104
}
105
105
Original file line number Diff line number Diff line change @@ -146,9 +146,9 @@ export const ConfirmSavePopup: React.FC<Props> = ({
146
146
} ) }
147
147
</ MuiTypography >
148
148
< CardList
149
- data = { attributionIdsToSave }
149
+ data = { attributionIdsToSave . filter ( ( id ) => id in attributions ) }
150
150
renderItemContent = { ( attributionId , { index } ) => {
151
- if ( ! attributionId || ! ( attributionId in attributions ) ) {
151
+ if ( ! attributions [ attributionId ] ) {
152
152
return null ;
153
153
}
154
154
You can’t perform that action at this time.
0 commit comments