Showing
1 changed file
with
3 additions
and
1 deletions
... | ... | @@ -587,7 +587,9 @@ export const actionSchema: FormSchema[] = [ |
587 | 587 | placeholder: '请选择服务', |
588 | 588 | api: async (params: Recordable) => { |
589 | 589 | try { |
590 | - const record = await getModelServices(params as Record<'deviceProfileId', string>); | |
590 | + if (!Reflect.get(params, 'deviceProfileId')) return []; | |
591 | + const record = | |
592 | + (await getModelServices(params as Record<'deviceProfileId', string>)) || []; | |
591 | 593 | const selected = record.find((item) => item.id === thingsModelId); |
592 | 594 | selected && |
593 | 595 | updateSchema({ | ... | ... |