Skip to content

Commit a582d74

Browse files
committed
chore: potential fix
1 parent bcd7c11 commit a582d74

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/runtime/src/helpers/functions.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ export const generateFunctions = async (
3535
const publishDir = relative(functionDir, publish)
3636

3737
for (const { route, config, compiled } of apiRoutes) {
38+
if (config.type === undefined) {
39+
// We're not generating a function for this route because it's not a background or scheduled function.
40+
continue
41+
}
42+
3843
const apiHandlerSource = await getApiHandler({
3944
page: route,
4045
config,
@@ -210,7 +215,7 @@ export const warnOnApiRoutes = async ({
210215
if (functions.some((func) => func.schedule)) {
211216
console.warn(
212217
outdent`
213-
${chalk.yellowBright`Using scheduled API routes`}
218+
${chalk.yellowBright`Using scheduled API routes`}
214219
These are run on a schedule when deployed to production.
215220
You can test them locally by loading them in your browser but this will not be available when deployed, and any returned value is ignored.
216221
`,

0 commit comments

Comments
 (0)