@blocklet/pages-kit-block-studio 0.4.89 → 0.4.90

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -494,7 +494,13 @@ function Layout({ loadState, loadedData }) {
494
494
  Toast_1.default.error('生成接口预览失败');
495
495
  }
496
496
  }, children: "Properties \u2192 Interface" })] })] }) }), state.metadata.id && ((0, jsx_runtime_1.jsx)(material_1.ListItem, { children: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: { width: '100%' }, children: (0, jsx_runtime_1.jsx)(components_1.ParametersConfig, { config: state.metadata, allComponents: mergedAllBlocks, defaultLocale: defaultLocale, locale: locale, propertiesValue: mergedPropertiesValues, onChange: ({ key, value, id, path, ...rest }) => {
497
- const property = (0, get_1.default)(state.metadata, [...path, 'data']);
497
+ const realPath = [...path, 'data'];
498
+ const property = (0, get_1.default)(state.metadata, realPath);
499
+ // ensure property exist
500
+ if (!property) {
501
+ Toast_1.default.warning(`无法找到属性,请检查在 @metadata.json 中,是否存在该属性: ${realPath.join('.')}`);
502
+ return;
503
+ }
498
504
  const realValue = (0, property_1.parsePropertyValue)(property, value.value, {
499
505
  locale,
500
506
  defaultLocale,