Skip to content

Commit

Permalink
[Fix] Editing assistant without changing its name is possible again (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
philipperolet authored Dec 26, 2023
1 parent 93b4644 commit 42329c9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion front/components/assistant_builder/AssistantBuilder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,8 @@ export default function AssistantBuilder({
if (checkUsernameTimeout.current) {
clearTimeout(checkUsernameTimeout.current);
}
// No check needed if the assistant doesn't change name
if (handle === initialBuilderState?.handle) return Promise.resolve(true);
return new Promise((resolve, reject) => {
checkUsernameTimeout.current = setTimeout(async () => {
checkUsernameTimeout.current = null;
Expand All @@ -417,7 +419,7 @@ export default function AssistantBuilder({
}, 500);
});
},
[owner.sId]
[owner.sId, initialBuilderState?.handle]
);

const configuredDataSourceCount = Object.keys(
Expand Down

0 comments on commit 42329c9

Please sign in to comment.