mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
Improve error handling in VideoList
This commit is contained in:
parent
6476fc9b12
commit
e7379f4607
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
min/custom-navbar.min.js
vendored
2
min/custom-navbar.min.js
vendored
File diff suppressed because one or more lines are too long
@ -1360,11 +1360,12 @@ class VideoList extends NavbarComponent {
|
||||
return;
|
||||
}
|
||||
const json = await Ajax.getJsonWithCredentials(apiUrl);
|
||||
let videoList = ''
|
||||
if (json.code !== 0) {
|
||||
logError(`加载${name}信息失败. 错误码: ${json.code} ${json.message}`);
|
||||
return;
|
||||
logError(`加载${name}信息失败. 错误码: ${json.code} ${json.message}`)
|
||||
} else {
|
||||
videoList = listMap(json).join("");
|
||||
}
|
||||
const videoList = listMap(json).join("");
|
||||
videoListElement.insertAdjacentHTML("beforeend", videoList + /*html*/`
|
||||
<li class="more"><a target="_blank" href="${mainUrl}">查看更多</a></li>
|
||||
`);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user