@@ -5,7 +5,6 @@ import { escapeHtml, getSimpleName } from "../../utils";
55import { renderToggleSection , renderHighlightButton , renderDiagnosticRevealButton } from "../sections" ;
66
77export function renderContextVariables ( variables : LJVariable [ ] , isExpanded : boolean , errorAtCursor ?: RefinementMismatchError ) : string {
8- const expected = errorAtCursor ? errorAtCursor . expected . value : undefined ;
98 const relevantNames = new Set ( Object . keys ( errorAtCursor ?. translationTable || { } ) ) ;
109 return /*html*/ `
1110 <div class="context-section">
@@ -33,7 +32,7 @@ export function renderContextVariables(variables: LJVariable[], isExpanded: bool
3332 <td><code>${ renderHighlightedInlineExpression ( variable . refinement ) } </code></td>
3433 </tr>
3534 ` } ) . join ( '' ) }
36- ${ errorAtCursor ? renderFailingRefinement ( errorAtCursor , expected ! ) : '' }
35+ ${ errorAtCursor ? renderFailingRefinement ( errorAtCursor ) : '' }
3736 </tbody>
3837 </table>
3938 ` : '<p>No variables declared at the cursor position</p>' }
@@ -42,11 +41,11 @@ export function renderContextVariables(variables: LJVariable[], isExpanded: bool
4241 ` ;
4342}
4443
45- function renderFailingRefinement ( errorAtCursor : RefinementMismatchError , expected : string ) : string {
44+ function renderFailingRefinement ( errorAtCursor : RefinementMismatchError ) : string {
4645 return /*html*/ `
4746 <tr>
4847 <td class="failing-refinement tooltip" colspan="2" data-tooltip="${ escapeHtml ( errorAtCursor . title ) } ">
49- ${ renderDiagnosticRevealButton ( errorAtCursor . position ! , '⊢ ' + expected ) }
48+ ${ renderDiagnosticRevealButton ( errorAtCursor . position ! , '⊢ ' + errorAtCursor . expected ) }
5049 </td>
5150 </tr>
5251 ` ;
0 commit comments