← back to Wallco Ai
fix(chat.js): SyntaxError on line 145 — 'Here\\'s' broke string parsing
bc44f2892bb5e8c8d23d900d2168ae4b7ddc454d · 2026-05-11 23:19:14 -0700 · SteveStudio2
The 'variant' action message used 'Here\\'s a variant.' inside a
single-quoted JS string. \\' becomes literal \ + ' which closes the
string mid-word, then 's a variant.' is unparseable. Result was a
"missing ) after argument list" SyntaxError at load on /studio (chat.js
is included site-wide), which blocked nothing visible but threw on
every page load. Fixed by switching to double-quoted string for that
literal.
Files touched
Diff
commit bc44f2892bb5e8c8d23d900d2168ae4b7ddc454d
Author: SteveStudio2 <stevestudio2@SteveStacStudio.lan>
Date: Mon May 11 23:19:14 2026 -0700
fix(chat.js): SyntaxError on line 145 — 'Here\\'s' broke string parsing
The 'variant' action message used 'Here\\'s a variant.' inside a
single-quoted JS string. \\' becomes literal \ + ' which closes the
string mid-word, then 's a variant.' is unparseable. Result was a
"missing ) after argument list" SyntaxError at load on /studio (chat.js
is included site-wide), which blocked nothing visible but threw on
every page load. Fixed by switching to double-quoted string for that
literal.
---
public/js/chat.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/public/js/chat.js b/public/js/chat.js
index a0c52aa..774d1be 100644
--- a/public/js/chat.js
+++ b/public/js/chat.js
@@ -142,7 +142,7 @@
// Server didn't render a preamble — synthesize one
if (j.actions[0].type === 'search_results') addMsg('assistant', `Here are ${j.actions[0].count} matches:`);
if (j.actions[0].type === 'new_design') addMsg('assistant', 'Generated a new design for you.');
- if (j.actions[0].type === 'variant') addMsg('assistant', 'Here\\'s a variant.');
+ if (j.actions[0].type === 'variant') addMsg('assistant', "Here's a variant.");
}
(j.actions || []).forEach(a => {
if (a.type === 'search_results') addSearchGrid(a.designs || []);
← ece6129 swipe: real touch-drag works on mobile — attach move+end to
·
back to Wallco Ai
·
wallco.ai · context toggle on /design/:id (residential/comme d92efea →