mirror of
https://github.com/openharmony/ace_ace_engine.git
synced 2026-07-21 09:55:23 -04:00
web code BUG fix
Signed-off-by: lanyill <lanyi3@huawei.com> Change-Id: I45feeef02043af50cc5ba2475a6b33b323d03e35
This commit is contained in:
@@ -162,8 +162,8 @@ void JSWebController::LoadUrl(const JSCallbackInfo& args)
|
||||
LOGE("JSWebController failed to parse url object");
|
||||
return;
|
||||
}
|
||||
int np = webSrc.find_first_of("/");
|
||||
url = (np < 0) ? webSrc : webSrc.erase(np, 1);
|
||||
auto np = webSrc.find_first_of("/");
|
||||
url = (np == std::string::npos) ? webSrc : webSrc.erase(np, 1);
|
||||
} else if (!ConvertFromJSValue(valUrl, url)) {
|
||||
LOGW("can't find url.");
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user