chore: use copy of options for modification

This commit is contained in:
Elliot DeNolf
2023-09-28 15:23:48 -04:00
parent 719dd1f2ba
commit 33aac93c6e

View File

@@ -23,7 +23,8 @@ import graphQLHandler from './graphql/graphQLHandler'
import initGraphQLPlayground from './graphql/initPlayground'
import { getPayload } from './payload'
export const initHTTP = async (options: InitOptions): Promise<Payload> => {
export const initHTTP = async (incomingOptions: InitOptions): Promise<Payload> => {
const options = { ...incomingOptions }
if (typeof options.local === 'undefined') options.local = false
// Disable onInit because it will be called in top-level Payload