You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I spotted that if you have a render rule that potentially returns null or undefined and you use applyStyle in other rule it could produce an exception.
Here is my case:
I don't want to render anything when I have softbreak in the markdown but for textgroup items, depending on the children I have to render a View or a Text. Besides when I have to render a View in a textgroup item I need to use applyStyle for styling possible texts inside.
In this case when applyStyle is called it tries to get type of the null child and crashes.
I spotted that if you have a render rule that potentially returns
null
orundefined
and you useapplyStyle
in other rule it could produce an exception.Here is my case:
I don't want to render anything when I have
softbreak
in the markdown but fortextgroup
items, depending on the children I have to render aView
or aText
. Besides when I have to render aView
in atextgroup
item I need to useapplyStyle
for styling possible texts inside.In this case when
applyStyle
is called it tries to gettype
of thenull
child and crashes.react-native-markdown-renderer/src/lib/util/applyStyle.js
Lines 16 to 18 in 260fad0
The text was updated successfully, but these errors were encountered: