Skip to content

Commit

Permalink
🐛 fix: fix an error when plugin settings is undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx committed Aug 26, 2023
1 parent 71baf8e commit 666e503
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export const createLobeChatPluginGateway = (pluginsIndexUrl: string) => {

if (manifest.settings) {
const v = new Validator(manifest.settings as any);
const validator = v.validate(settings);
const validator = v.validate(settings || {});
if (!validator.valid)
return createErrorResponse(PluginErrorType.PluginSettingsInvalid, {
error: validator.errors,
Expand Down

0 comments on commit 666e503

Please sign in to comment.