Commit 34d8523
committed
fix(navbar): handle products without a purchaseUrl
ProductLearnMoreLink crashed SSG for any product lacking a purchaseUrl:
the product matched in config but baseHref was undefined, so addUtmParams
called undefined.includes() and failed the build. Query Filters (a library
with no product page) was the first such product.
Now: render no commercial CTA for products without a purchase page, and
guard addUtmParams against a falsy URL (defense in depth).1 parent f07a885 commit 34d8523
1 file changed
Lines changed: 11 additions & 0 deletions
File tree
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
23 | 26 | | |
24 | 27 | | |
25 | 28 | | |
| |||
40 | 43 | | |
41 | 44 | | |
42 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
43 | 54 | | |
44 | 55 | | |
45 | 56 | | |
| |||
0 commit comments