Commit ba12ab5
committed
fix(ui): use lit/directives instead of lit-html/directives for ifDefined
The ifDefined import from 'lit-html/directives/if-defined.js' resolved to
lit-html@1.4.1 (via pnpm root node_modules), but LitElement's render()
uses lit@2.8.0's template engine. The 2.x renderer doesn't recognize 1.x
directive functions (different branding: WeakMap vs _$litDirective$
property), so it stringified the function — causing minified JS code to
appear as placeholder text in j-input and other components.
Fix: import from 'lit/directives/if-defined.js' which always resolves to
the lit-html version bundled with lit@2.8.0.1 parent ed365f3 commit ba12ab5
2 files changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
0 commit comments