Closed angeloashmore closed 1 year ago
This PR fixes a bug where exitPreview() tirggered the following warning when used in the Pages Router:
exitPreview()
Cannot set headers after they are sent to the client
This warning was triggered by calling res.setHeader() after res.json(), which is not allowed.
res.setHeader()
res.json()
Types of changes
Description
This PR fixes a bug where
exitPreview()
tirggered the following warning when used in the Pages Router:This warning was triggered by calling
res.setHeader()
afterres.json()
, which is not allowed.Checklist: