We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fbaa7ba commit 1ca5f0dCopy full SHA for 1ca5f0d
lib/html_parser.dart
@@ -258,16 +258,18 @@ class HtmlParser extends StatelessWidget {
258
tree.element,
259
);
260
assert(render is InlineSpan || render is Widget);
261
- return render is InlineSpan
262
- ? render
263
- : WidgetSpan(
264
- child: ContainerSpan(
265
- newContext: newContext,
266
- style: tree.style,
267
- shrinkWrap: context.parser.shrinkWrap,
268
- child: render,
269
- ),
270
- );
+ if (render != null) {
+ return render is InlineSpan
+ ? render
+ : WidgetSpan(
+ child: ContainerSpan(
+ newContext: newContext,
+ style: tree.style,
+ shrinkWrap: context.parser.shrinkWrap,
+ child: render,
+ ),
271
+ );
272
+ }
273
}
274
275
//Return the correct InlineSpan based on the element type.
0 commit comments