Initial commit
This commit is contained in:
commit
78f8d225ee
21173 changed files with 2907774 additions and 0 deletions
12
node_modules/next/dist/esm/client/components/router-reducer/handle-segment-mismatch.js
generated
vendored
Normal file
12
node_modules/next/dist/esm/client/components/router-reducer/handle-segment-mismatch.js
generated
vendored
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
import { handleExternalUrl } from './reducers/navigate-reducer';
|
||||
/**
|
||||
* Handles the case where the client router attempted to patch the tree but, due to a mismatch, the patch failed.
|
||||
* This will perform an MPA navigation to return the router to a valid state.
|
||||
*/ export function handleSegmentMismatch(state, action, treePatch) {
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
console.warn('Performing hard navigation because your application experienced an unrecoverable error. If this keeps occurring, please file a Next.js issue.\n\n' + 'Reason: Segment mismatch\n' + ("Last Action: " + action.type + "\n\n") + ("Current Tree: " + JSON.stringify(state.tree) + "\n\n") + ("Tree Patch Payload: " + JSON.stringify(treePatch)));
|
||||
}
|
||||
return handleExternalUrl(state, {}, state.canonicalUrl, true);
|
||||
}
|
||||
|
||||
//# sourceMappingURL=handle-segment-mismatch.js.map
|
||||
Loading…
Add table
Add a link
Reference in a new issue