swico 0.6.2-beta1 → 0.6.2-beta2
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
CHANGED
|
@@ -111,13 +111,14 @@ var getFormatHistoryOption = function (to, formatRouterBase, pathList, type) {
|
|
|
111
111
|
obj.pathname = "".concat(formatRouterBase).concat(path);
|
|
112
112
|
}
|
|
113
113
|
if (name) {
|
|
114
|
+
console.log('pathList', pathList);
|
|
114
115
|
var fullPath = (_a = pathList.find(function (item) { return item.name === name; })) === null || _a === void 0 ? void 0 : _a.path;
|
|
115
116
|
var targetPath = fullPath ? interpolatePath(fullPath, params) : null;
|
|
116
117
|
if (targetPath) {
|
|
117
118
|
obj.pathname = "".concat(formatRouterBase).concat(targetPath);
|
|
118
119
|
}
|
|
119
120
|
else {
|
|
120
|
-
throw "An error occurred while executing '
|
|
121
|
+
throw "An error occurred while executing 'history.".concat(type, "' operation: The path for the name \"").concat(name, "\" could not be found");
|
|
121
122
|
}
|
|
122
123
|
}
|
|
123
124
|
return obj;
|
|
@@ -140,7 +141,7 @@ var getHistory = function (routerBase, routerType) {
|
|
|
140
141
|
originalHistory.push(formatOption);
|
|
141
142
|
break;
|
|
142
143
|
default:
|
|
143
|
-
throw "An error occurred while executing
|
|
144
|
+
throw "An error occurred while executing history.push operation: unexpected type of 'to':".concat(typeof to);
|
|
144
145
|
}
|
|
145
146
|
},
|
|
146
147
|
replace: function (to) {
|
|
@@ -153,7 +154,7 @@ var getHistory = function (routerBase, routerType) {
|
|
|
153
154
|
originalHistory.replace(formatOption);
|
|
154
155
|
break;
|
|
155
156
|
default:
|
|
156
|
-
throw "An error occurred while executing
|
|
157
|
+
throw "An error occurred while executing history.replace operation: unexpected type of 'to':".concat(typeof to);
|
|
157
158
|
}
|
|
158
159
|
},
|
|
159
160
|
get location() {
|