Skip to content

Commit 10e28ae

Browse files
committed
fix: don't throw an error, when generation propmt for generation is not provided
1 parent 520a2dc commit 10e28ae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ export default class UploadPlugin extends AdminForthPlugin {
358358
this.adminforth = adminforth;
359359

360360
if (this.options.generation) {
361-
const template = this.options.generation?.generationPrompt;
361+
const template = this.options.generation?.generationPrompt || '';
362362
const regex = /{{(.*?)}}/g;
363363
const matches = template.match(regex);
364364
if (matches) {

0 commit comments

Comments
 (0)