swico 0.6.2-beta3 → 0.6.2-beta4
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
|
@@ -36,8 +36,6 @@ var history_1 = require("./history");
|
|
|
36
36
|
var config_1 = require("./config");
|
|
37
37
|
require("../../global");
|
|
38
38
|
var layout_1 = __importDefault(require("../../layout"));
|
|
39
|
-
var _a = (0, history_1.getHistory)(config_1.routerBase, config_1.routerType), swicoHistory = _a.history, originalHistory = _a.originalHistory;
|
|
40
|
-
exports.history = swicoHistory;
|
|
41
39
|
var renderChildrenRouteList = function (childrenRoutes, ancPathKey) {
|
|
42
40
|
return childrenRoutes === null || childrenRoutes === void 0 ? void 0 : childrenRoutes.map(function (item) {
|
|
43
41
|
var component = item.component, path = item.path, children = item.children, redirect = item.redirect;
|
|
@@ -46,6 +44,8 @@ var renderChildrenRouteList = function (childrenRoutes, ancPathKey) {
|
|
|
46
44
|
});
|
|
47
45
|
};
|
|
48
46
|
var App = function () {
|
|
47
|
+
var _a = (0, history_1.getHistory)(config_1.routerBase, config_1.routerType), swicoHistory = _a.history, originalHistory = _a.originalHistory;
|
|
48
|
+
exports.history = swicoHistory;
|
|
49
49
|
if (config_1.routerBase && config_1.routerBase !== '/') {
|
|
50
50
|
if (config_1.routerType === 'browser' && window.location.pathname === '/') {
|
|
51
51
|
window.location.replace("".concat(config_1.routerBase));
|