Skip to content

Commit a2a1ded

Browse files
committed
fix: changed not found message and added xtra check
1 parent 5064473 commit a2a1ded

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/runtime/src/helpers/functions.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const checkForPackage = async (packageDir: string, nodeModule: boolean) => {
3636
const packagePlugin = existsSync(packageDir) ? await readJSON(packageDir) : null
3737
const nextPlugin =
3838
packagePlugin?.dependencies[NEXT_PLUGIN] && !nodeModule ? packagePlugin.dependencies[NEXT_PLUGIN] : null
39-
const checkModule = packagePlugin && nodeModule ? packagePlugin.version : null
39+
const checkModule = packagePlugin?.version && nodeModule ? packagePlugin.version : null
4040

4141
return checkModule || nextPlugin
4242
}
@@ -50,7 +50,7 @@ const writeFunctionConfiguration = async (functionName: string, functionTitle: s
5050
const metadata = {
5151
config: {
5252
name: functionTitle,
53-
generator: nextPluginVersion ? `${NEXT_PLUGIN_NAME}@${nextPluginVersion}` : 'Plugin Not Found',
53+
generator: nextPluginVersion ? `${NEXT_PLUGIN_NAME}@${nextPluginVersion}` : 'Next Runtime Version Not Found',
5454
},
5555
version: 1,
5656
}

0 commit comments

Comments
 (0)