Commit 67a05a7
committed
fix: allow Option<String> and Option<AttrValue> as VNode children in html!
Generalize `IntoPropValue<VNode> for Option<VNode>` into a blanket
`IntoPropValue<VNode> for Option<T>` where `T: IntoPropValue<VNode>`.
The single-expression child path in the html! macro calls
`IntoPropValue::<VNode>::into_prop_value()` directly, which only had
an impl for `Option<VNode>`. This is a regression from the removal of
the `ToHtml` trait, which had a blanket `Option<T: ToHtml>` impl.1 parent ce72475 commit 67a05a7
2 files changed
Lines changed: 27 additions & 2 deletions
File tree
- packages
- yew-macro/tests/html_macro
- yew/src/html/conversion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
126 | 138 | | |
127 | 139 | | |
128 | 140 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
217 | | - | |
| 217 | + | |
218 | 218 | | |
219 | 219 | | |
220 | | - | |
| 220 | + | |
| 221 | + | |
221 | 222 | | |
222 | 223 | | |
223 | 224 | | |
| |||
350 | 351 | | |
351 | 352 | | |
352 | 353 | | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
353 | 366 | | |
354 | 367 | | |
355 | 368 | | |
| |||
0 commit comments