Skip to content

Commit 1a71a61

Browse files
committed
Avoid crash for invalid Uri.
1 parent 8376f8c commit 1a71a61

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

router-api/src/main/java/com/lzh/nonview/router/route/InternalCallback.java

+4-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,10 @@ public void onOpenSuccess(RouteRule rule) {
5151
}
5252

5353
public void onOpenFailed(Throwable e) {
54-
this.error = e;
54+
if (error == null) {
55+
// 只接受第一次配置的异常
56+
this.error = e;
57+
}
5558
}
5659

5760
void invoke(Context context) {

0 commit comments

Comments
 (0)