FIX: prevents to call Object.keys on null (#1217)
This was causing errors in the forms under specific cases.
This commit is contained in:
parent
9dfae3d472
commit
913314b67d
|
@ -290,7 +290,7 @@ export default class AiEmbeddingEditor extends Component {
|
||||||
|
|
||||||
@action
|
@action
|
||||||
providerKeys(providerParams) {
|
providerKeys(providerParams) {
|
||||||
return Object.keys(providerParams);
|
return providerParams ? Object.keys(providerParams) : [];
|
||||||
}
|
}
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
|
@ -252,7 +252,7 @@ export default class AiLlmEditorForm extends Component {
|
||||||
|
|
||||||
@action
|
@action
|
||||||
providerParamsKeys(providerParams) {
|
providerParamsKeys(providerParams) {
|
||||||
return Object.keys(providerParams);
|
return providerParams ? Object.keys(providerParams) : [];
|
||||||
}
|
}
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
|
@ -30,7 +30,7 @@ export default class AiPersonaToolOptions extends Component {
|
||||||
|
|
||||||
@action
|
@action
|
||||||
formObjectKeys(toolOptions) {
|
formObjectKeys(toolOptions) {
|
||||||
return Object.keys(toolOptions);
|
return toolOptions ? Object.keys(toolOptions) : [];
|
||||||
}
|
}
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
Loading…
Reference in New Issue