We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a78bc6c commit 34a0d00Copy full SHA for 34a0d00
packages/payload-cloud/src/plugin.ts
@@ -128,6 +128,8 @@ export const payloadCloudPlugin =
128
return config
129
}
130
131
+ const oldAutoRunCopy = config.jobs.autoRun
132
+
133
const newAutoRun = async (payload: Payload) => {
134
const instance = generateRandomString()
135
@@ -150,9 +152,8 @@ export const payloadCloudPlugin =
150
152
if (!config.jobs?.autoRun) {
151
153
return [DEFAULT_CRON_JOB]
154
- return typeof config.jobs.autoRun === 'function'
- ? await config.jobs.autoRun(payload)
155
- : config.jobs.autoRun
156
+ return typeof oldAutoRunCopy === 'function' ? await oldAutoRunCopy(payload) : oldAutoRunCopy
157
158
159
config.jobs.autoRun = newAutoRun
0 commit comments