refactor: 收敛公开工作区运行时契约
This commit is contained in:
1 parent
d5e63be074
commit
9b61047ec6
13 files changed
+93
-64
No files matched your search
@@ -160,7 +160,7 @@ export function validateTemplatePackageManifest(value: unknown): string[] {
|
||||
}
|
||||
if (manifest.sampleContent !== undefined) {
|
||||
for (const [industryKey, sample] of Object.entries(manifest.sampleContent)) {
|
||||
if (!manifest.supportedIndustryTemplates.includes(industryKey))
|
||||
if (!manifest.supportedIndustryTemplates?.includes(industryKey))
|
||||
errors.push(`sampleContent.${industryKey} is not a supported industry template`);
|
||||
if (sample.templateKey !== industryKey)
|
||||
errors.push(`sampleContent.${industryKey}.templateKey must match its key`);
|
||||
|
||||
Reference in new issue
Block a user