@vaadin/component-base 24.2.1 → 24.2.3
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/package.json +2 -2
- package/src/element-mixin.js +1 -1
- package/src/url-utils.d.ts +2 -1
- package/src/url-utils.js +5 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/component-base",
|
|
3
|
-
"version": "24.2.
|
|
3
|
+
"version": "24.2.3",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"@vaadin/testing-helpers": "^0.5.0",
|
|
43
43
|
"sinon": "^13.0.2"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "72e557e765e72559e9c6a525e257d185ad186dc5"
|
|
46
46
|
}
|
package/src/element-mixin.js
CHANGED
package/src/url-utils.d.ts
CHANGED
package/src/url-utils.js
CHANGED
|
@@ -5,12 +5,15 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
* Check if two paths
|
|
8
|
+
* Check if two paths can be resolved as URLs
|
|
9
|
+
* with the same origin and pathname.
|
|
9
10
|
*
|
|
10
11
|
* @param {string} path1
|
|
11
12
|
* @param {string} path2
|
|
12
13
|
*/
|
|
13
14
|
export function matchPaths(path1, path2) {
|
|
14
15
|
const base = document.baseURI;
|
|
15
|
-
|
|
16
|
+
const url1 = new URL(path1, base);
|
|
17
|
+
const url2 = new URL(path2, base);
|
|
18
|
+
return url1.origin === url2.origin && url1.pathname === url2.pathname;
|
|
16
19
|
}
|