UNPKG

vike

Version:

(Replaces Next.js/Nuxt) 🔨 Composable framework to build advanced applications with flexibility and stability.

9 lines (8 loc) • 468 B
export { forkPageContext }; import { objectAssign } from '../utils/objectAssign.js'; // Create pageContext forks to avoid leaks: upon an error (bug or abort) a brand new pageContext object is created, in order to avoid previous pageContext modifications that are now obsolete to leak to the new pageContext object. function forkPageContext(pageContext) { const pageContextNew = {}; objectAssign(pageContextNew, pageContext, true); return pageContextNew; }