Showing
1 changed file
with
3 additions
and
1 deletions
| @@ -587,7 +587,9 @@ export const actionSchema: FormSchema[] = [ | @@ -587,7 +587,9 @@ export const actionSchema: FormSchema[] = [ | ||
| 587 | placeholder: '请选择服务', | 587 | placeholder: '请选择服务', |
| 588 | api: async (params: Recordable) => { | 588 | api: async (params: Recordable) => { |
| 589 | try { | 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 | const selected = record.find((item) => item.id === thingsModelId); | 593 | const selected = record.find((item) => item.id === thingsModelId); |
| 592 | selected && | 594 | selected && |
| 593 | updateSchema({ | 595 | updateSchema({ |