Is this a compose compiler bug? Using <#C01F2HV786...
# compose
r
Is this a compose compiler bug? Using #compose-web, this inside a composable does the expected thing:
Copy code
@Composable
fun ElementScope<HTMLElement>.BlockChildLink(
  span: BlockChildSpan,
  markDefs: List<MarkDef>,
  content: @Composable ElementScope<HTMLElement>.() -> Unit
) {
  val link = span.marks.linkOrNull(markDefs)
  if (link != null) {
    A(href = link.href) {
      content()
    }
  } else content()
}
but this always results in empty content if the link is null i.e. the
content()
to the right of the elvis operator is ignored:
Copy code
@Composable
fun ElementScope<HTMLElement>.BlockChildLink(
  span: BlockChildSpan,
  markDefs: List<MarkDef>,
  content: @Composable ElementScope<HTMLElement>.() -> Unit
) {
  span.marks.linkOrNull(markDefs)?.let { link ->
    A(href = link.href) {
      content()
    }
  } ?: content()
}
e