Fix JSX ReferenceError: escape {{wordId}} literal in option text
{{wordId}} in JSX is parsed as a JS expression trying to resolve the variable
`wordId`. Wrap in a string expression so it renders as literal text.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -411,7 +411,7 @@ function PairForm({ objectId, allObjects, onPairSaved }) {
|
||||
{matchingObjs.length > 0 ? (
|
||||
<select value={assigned} onChange={e => setObjectAssignments(prev => ({ ...prev, [w.id]: e.target.value || null }))}
|
||||
className={`flex-1 text-xs border rounded px-1.5 py-0.5 bg-white focus:outline-none focus:ring-1 focus:ring-indigo-400 ${assigned ? 'border-indigo-400 text-indigo-700 bg-indigo-50' : 'border-slate-200 text-slate-500'}`}>
|
||||
<option value="">— nur Wort ({{wordId}})</option>
|
||||
<option value="">{'— nur Wort ({{wordId}})'}</option>
|
||||
{matchingObjs.map(obj => {
|
||||
const idx = safeObjects.indexOf(obj);
|
||||
const labels = (obj._words || []).slice(0, 3).map(ow => ow.titel_de || ow.id).join(', ');
|
||||
|
||||
Reference in New Issue
Block a user