Skip to content

Commit d5d3b3b

Browse files
author
Dobromir Hristov
committed
fix: use identifier instead of reference
1 parent 3d7130e commit d5d3b3b

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/components/DocumentationTopic/TopicsLinkCardGridItem.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export default {
6666
computed: {
6767
imageReferences: ({ item }) => (item.images || []).reduce((all, current) => {
6868
// eslint-disable-next-line no-param-reassign
69-
all[current.type] = current.reference;
69+
all[current.type] = current.identifier;
7070
return all;
7171
}, { icon: null, card: null }),
7272
linkText: ({ compact, item }) => (compact ? '' : (ROLE_LINK_TEXT[item.role] || 'Learn more')),

tests/unit/components/DocumentationTopic/TopicsLinkCardGridItem.spec.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const defaultProps = {
2222
url: 'http://foo.com',
2323
images: [{
2424
type: 'card',
25-
reference: 'card-reference',
25+
identifier: 'card-reference',
2626
}],
2727
title: 'Foo',
2828
abstract: [{ type: 'text', text: 'Content' }],
@@ -53,7 +53,7 @@ describe('TopicsLinkCardGridItem', () => {
5353
const card = wrapper.find(Card);
5454
expect(card.props()).toMatchObject({
5555
url: defaultProps.item.url,
56-
image: defaultProps.item.images[0].reference,
56+
image: defaultProps.item.images[0].identifier,
5757
title: defaultProps.item.title,
5858
floatingStyle: true,
5959
size: undefined,
@@ -99,7 +99,7 @@ describe('TopicsLinkCardGridItem', () => {
9999
...defaultProps.item,
100100
images: [{
101101
type: 'icon',
102-
reference: iconRef.identifier,
102+
identifier: iconRef.identifier,
103103
}],
104104
},
105105
},
@@ -118,7 +118,7 @@ describe('TopicsLinkCardGridItem', () => {
118118
const card = wrapper.find(Card);
119119
expect(card.props()).toMatchObject({
120120
url: defaultProps.item.url,
121-
image: defaultProps.item.images[0].reference,
121+
image: defaultProps.item.images[0].identifier,
122122
title: defaultProps.item.title,
123123
floatingStyle: true,
124124
size: 'large',

0 commit comments

Comments
 (0)