bpms_site/.svn/pristine/ac/ac5d6834a96953e52b3eca1c42520b8fdf3b9a23.svn-base
2025-11-02 16:38:49 +03:30

35 lines
1.1 KiB
Plaintext

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "restoreReducer", {
enumerable: true,
get: function() {
return restoreReducer;
}
});
const _createhreffromurl = require("../create-href-from-url");
function restoreReducer(state, action) {
const { url, tree } = action;
const href = (0, _createhreffromurl.createHrefFromUrl)(url);
return {
buildId: state.buildId,
// Set canonical url
canonicalUrl: href,
pushRef: state.pushRef,
focusAndScrollRef: state.focusAndScrollRef,
cache: state.cache,
prefetchCache: state.prefetchCache,
// Restore provided tree
tree: tree,
nextUrl: url.pathname
};
}
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', { value: true });
Object.assign(exports.default, exports);
module.exports = exports.default;
}
//# sourceMappingURL=restore-reducer.js.map