@graphcommerce/next-ui 4.3.1 → 4.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/PageMeta/PageMeta.tsx +6 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 4.3.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#1343](https://github.com/graphcommerce-org/graphcommerce/pull/1343) [`b76d0892a`](https://github.com/graphcommerce-org/graphcommerce/commit/b76d0892a11bd916aefd46ba72c2da00e38ce45b) Thanks [@ErwinOtten](https://github.com/ErwinOtten)! - Canonicals could contain a double slash in the URL
|
|
8
|
+
|
|
3
9
|
## 4.3.1
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/PageMeta/PageMeta.tsx
CHANGED
|
@@ -65,7 +65,12 @@ export function useCanonical(incomming?: Canonical) {
|
|
|
65
65
|
|
|
66
66
|
href = localeDomain || addBasePath(addLocale(as, curLocale, router && router.defaultLocale))
|
|
67
67
|
|
|
68
|
-
|
|
68
|
+
let siteUrl = process.env.NEXT_PUBLIC_SITE_URL
|
|
69
|
+
if (siteUrl && siteUrl.endsWith('/')) {
|
|
70
|
+
siteUrl = siteUrl.slice(0, -1)
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
canonical = `${siteUrl}${href}`
|
|
69
74
|
}
|
|
70
75
|
|
|
71
76
|
if (!canonical.startsWith('http')) {
|
package/package.json
CHANGED