Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.

Commit 9a752ef

Browse files
authored
FIX: do not error when tools are empty (#1218)
1 parent 913314b commit 9a752ef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

assets/javascripts/discourse/admin/models/ai-persona.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export default class AiPersona extends RestModel {
7676
}
7777

7878
flattenedToolStructure(data) {
79-
return data.tools.map((tName) => {
79+
return (data.tools || []).map((tName) => {
8080
return [tName, data.toolOptions[tName], data.forcedTools.includes(tName)];
8181
});
8282
}

0 commit comments

Comments
 (0)