@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 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
@@ -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
- canonical = `${process.env.NEXT_PUBLIC_SITE_URL}${href}`
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
@@ -2,7 +2,7 @@
2
2
  "name": "@graphcommerce/next-ui",
3
3
  "homepage": "https://www.graphcommerce.org/",
4
4
  "repository": "github:graphcommerce-org/graphcommerce",
5
- "version": "4.3.1",
5
+ "version": "4.3.2",
6
6
  "author": "",
7
7
  "license": "MIT",
8
8
  "sideEffects": false,