@micromag/core 0.3.485 → 0.3.486
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/lib/contexts.js +6 -5
- package/package.json +2 -3
package/lib/contexts.js
CHANGED
|
@@ -1288,13 +1288,14 @@ function RoutesProvider(_ref) {
|
|
|
1288
1288
|
RoutesProvider.propTypes = propTypes$6;
|
|
1289
1289
|
RoutesProvider.defaultProps = defaultProps$6;
|
|
1290
1290
|
var compilers = {};
|
|
1291
|
-
function generatePath(
|
|
1291
|
+
function generatePath(fullPath, data) {
|
|
1292
1292
|
var opts = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
1293
|
-
|
|
1294
|
-
|
|
1293
|
+
var fullUrlMatches = fullPath.match(/^(https?:\/\/[^/]+)\//);
|
|
1294
|
+
if (typeof compilers[fullPath] === 'undefined') {
|
|
1295
|
+
compilers[fullPath] = pathToRegexp.compile(fullPath.replace(/^(https?:\/\/[^/]+)\//, '/'), opts);
|
|
1295
1296
|
}
|
|
1296
|
-
var compiler = compilers[
|
|
1297
|
-
return compiler(data);
|
|
1297
|
+
var compiler = compilers[fullPath];
|
|
1298
|
+
return fullUrlMatches !== null ? "".concat(fullUrlMatches[1].substr(0, -1)).concat(compiler(data)) : compiler(data);
|
|
1298
1299
|
}
|
|
1299
1300
|
var useUrlGeneratorPathToRepexp = function useUrlGeneratorPathToRepexp() {
|
|
1300
1301
|
var _ref2 = useRoutesContext() || {},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/core",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.486",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [
|
|
@@ -115,7 +115,6 @@
|
|
|
115
115
|
"@fortawesome/fontawesome-svg-core": "^1.2.32",
|
|
116
116
|
"@fortawesome/free-solid-svg-icons": "^5.15.1",
|
|
117
117
|
"@fortawesome/react-fontawesome": "^0.1.13",
|
|
118
|
-
"@panneau/core": "^3.0.119",
|
|
119
118
|
"@react-spring/core": "^9.6.1",
|
|
120
119
|
"@react-spring/web": "^9.6.1",
|
|
121
120
|
"@uppy/core": "^2.1.4",
|
|
@@ -156,5 +155,5 @@
|
|
|
156
155
|
"access": "public",
|
|
157
156
|
"registry": "https://registry.npmjs.org/"
|
|
158
157
|
},
|
|
159
|
-
"gitHead": "
|
|
158
|
+
"gitHead": "dc11ac41ea80f5d5c5d7c247bfa146fda3cc9905"
|
|
160
159
|
}
|