chore: getPayloadHMR conditionally call db.connect (#6510)
This commit is contained in:
@@ -37,7 +37,9 @@ export const reload = async (config: SanitizedConfig, payload: Payload): Promise
|
||||
// TODO: support HMR for other props in the future (see payload/src/index init()) hat may change on Payload singleton
|
||||
|
||||
await payload.db.init()
|
||||
await payload.db.connect({ hotReload: true })
|
||||
if (payload.db.connect) {
|
||||
await payload.db.connect({ hotReload: true })
|
||||
}
|
||||
}
|
||||
|
||||
export const getPayloadHMR = async (options: InitOptions): Promise<Payload> => {
|
||||
|
||||
Reference in New Issue
Block a user