mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-09 03:18:18 +00:00
refac
This commit is contained in:
parent
93415a48e8
commit
0dcd6ac983
1 changed files with 8 additions and 5 deletions
|
|
@ -33,14 +33,17 @@
|
|||
|
||||
const init = async () => {
|
||||
loading = true;
|
||||
variableValues = {};
|
||||
for (const variable of Object.keys(variables)) {
|
||||
if (variables[variable]?.default !== undefined) {
|
||||
variableValues[variable] = variables[variable].default;
|
||||
const newValues = {};
|
||||
const keys = Object.keys(variables ?? {});
|
||||
for (const key of keys) {
|
||||
const variable = variables[key];
|
||||
if (variable?.default !== undefined) {
|
||||
newValues[key] = variable.default;
|
||||
} else {
|
||||
variableValues[variable] = '';
|
||||
newValues[key] = '';
|
||||
}
|
||||
}
|
||||
variableValues = newValues;
|
||||
loading = false;
|
||||
|
||||
await tick();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue