fix: repair broken loadConvs JS function in chat page
The function had an unclosed arrow function callback (convs.map(c => {)
followed by a misplaced catch, creating a JS syntax error that prevented
the entire <script> block from parsing — so no conversations or messages
rendered at all.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
e0c873cb4c
commit
d84f587b52
@@ -2122,13 +2122,7 @@ async function loadConvs() {
|
|||||||
const r = await fetch('/admin/chat?api=convs');
|
const r = await fetch('/admin/chat?api=convs');
|
||||||
if (!r.ok) return;
|
if (!r.ok) return;
|
||||||
const data = await r.json();
|
const data = await r.json();
|
||||||
const convs = data.conversations || [];
|
renderConvs(data.conversations || []);
|
||||||
if (convs.length === 0) {
|
|
||||||
list.innerHTML = '<div style="padding:24px 16px;text-align:center;color:#a0a8b8;font-size:13px">Sin conversaciones aún</div>';
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
list.innerHTML = convs.map(c => {
|
|
||||||
renderConvs(convs);
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error('loadConvs error:', e);
|
console.error('loadConvs error:', e);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user