Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BHRouter canOpenURL 校验时错误 #133

Open
zevwings opened this issue Mar 21, 2019 · 0 comments
Open

BHRouter canOpenURL 校验时错误 #133

zevwings opened this issue Mar 21, 2019 · 0 comments

Comments

@zevwings
Copy link

BHRouter 调用canOpenURL 时,使用URL.pathComponents获得的pathComponents会存在/,直接导致校验pathComponentKey是否为Class时,提前退出。

判断代码,当pathComponentKey/会报错。

Class mClass = NSClassFromString(pathComponentKey);
if (!mClass) {
     flag = NO;
     *stop = NO;
     return;
}

建议添加一行过滤代码

if ([pathComponentKey isEqualToString:@"/"]) {
      return;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant