Skip to content

Commit 91424fe

Browse files
committed
Update cards block
1 parent 949622d commit 91424fe

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

blocks/cards/cards.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ export default function decorate(block) {
1313

1414
/* wrap each card with link */
1515
const existingLink = li.querySelector('a');
16-
if (existingLink?.href) {
17-
const { href } = existingLink;
16+
if (existingLink?.textContent) {
17+
const { textContent } = existingLink;
1818
const wrapperLink = document.createElement('a');
19-
wrapperLink.href = href;
19+
wrapperLink.href = textContent;
2020

2121
// Move all children of li into the wrapperLink
2222
while (li.firstChild) {

0 commit comments

Comments
 (0)