mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-17 13:05:32 +09:00
fix(app): do not crash when the browser translates the page (#2624)
This commit is contained in:
1 parent
044a2c101d
commit
d729f641ff
83 files changed
+3774
-1080
No files matched your search
@@ -0,0 +1,16 @@
|
||||
language js
|
||||
|
||||
or {
|
||||
`<$tag $attrs>$children</$tag>`,
|
||||
`<>$children</>`
|
||||
} where {
|
||||
$children <: some $text where { $text <: JsxText(), $text <: r"(?s).*\S.*" },
|
||||
or { $children <: some `<$el $elAttrs>$elChildren</$el>`, $children <: some `<$void $voidAttrs />` },
|
||||
$text <: not within or {
|
||||
`<Trans $transAttrs>$transChildren</Trans>`,
|
||||
`<Plural $pluralAttrs>$pluralChildren</Plural>`,
|
||||
`<Select $selectAttrs>$selectChildren</Select>`,
|
||||
`<SelectOrdinal $ordinalAttrs>$ordinalChildren</SelectOrdinal>`
|
||||
} ,
|
||||
register_diagnostic(span=$text, message="Bare JSX text with an element sibling breaks under page translation. Chrome moves the text into a <font> wrapper, and React then inserts before or removes a node that is no longer a direct child, which throws NotFoundError. Collapse the children into a single string child, or wrap this text run in its own element so it is the sole child.", severity="error")
|
||||
}
|
||||
Reference in new issue
Block a user