fix: bilibili route /bilibili/user/video/:uid bug (#12920)

This commit is contained in:
HearingSmile 2023-08-01 19:03:27 +08:00 committed by GitHub
parent 31a59fd089
commit e86265bcf8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -13,7 +13,11 @@ module.exports = {
Referer: url,
},
});
return response.headers['set-cookie'].map((cookie) => cookie.split(';')[0]).join('; ');
const setCookies = response.headers['set-cookie'];
if (typeof setCookies === 'undefined') {
return '';
}
return setCookies.map((cookie) => cookie.split(';')[0]).join('; ');
});
},
getVerifyString: (ctx) => {