Skip to content

Commit 4f9185c

Browse files
author
Loi Tran
committed
Make sure onLinkTap is not null
1 parent 7ab3911 commit 4f9185c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/html_parser.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ class HtmlParser {
111111
decorationColor: Colors.blueAccent),
112112
),
113113
onTap: () {
114-
if (node.attributes.containsKey('href')) {
114+
if (node.attributes.containsKey('href') && onLinkTap != null) {
115115
String url = node.attributes['href'];
116116
onLinkTap(url);
117117
}

0 commit comments

Comments
 (0)