next
Version:
The React Framework
29 lines (27 loc) • 1.14 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "hmrRefreshReducer", {
enumerable: true,
get: function() {
return hmrRefreshReducer;
}
});
const _refreshreducer = require("./refresh-reducer");
const _pprnavigations = require("../ppr-navigations");
function hmrRefreshReducer(state, action) {
// HMR actions may wait behind a Server Action in the router queue. If a newer
// generation superseded this one before it started, don't install a refresh
// tree whose request is already canceled.
if (action.signal?.aborted) {
return state;
}
return (0, _refreshreducer.refreshDynamicData)(state, _pprnavigations.FreshnessPolicy.HMRRefresh, action.signal);
}
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=hmr-refresh-reducer.js.map