Skip to content

Commit

Permalink
fix: Fix the undefined schema issue when configuring custom plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
CH3CHO committed Dec 12, 2024
1 parent ffc8328 commit 4808544
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,11 @@ const GlobalPluginDetail = forwardRef((props: IProps, ref) => {
onSuccess: (res) => {
setConfigData(res);
setSchema(res.schema);
if (!res.schema.jsonSchema.properties) {
if (!res.schema?.jsonSchema?.properties) {
setCurrentTabKey('yaml');
}
if (!defaultValue) {
let exampleRaw = res?.schema?.extensions['x-example-raw'];
let exampleRaw = res.schema?.extensions ? res.schema.extensions['x-example-raw'] : '';
if (isChangeExampleRaw) {
// Need a space after the colon
exampleRaw = 'allow: []';
Expand Down

0 comments on commit 4808544

Please sign in to comment.