feat: 类型规范

This commit is contained in:
手瓜一十雪 committed 2025-02-02 20:16:11 +08:00
1 parent dec9b477e0
commit d626f872e6
16 files changed
+119 -173

No files matched your search

+7 -5
View File
@@ -41,11 +41,13 @@ export class RequestUtil {
private static extractCookies(setCookieHeaders: string[], cookies: { [key: string]: string }) {
setCookieHeaders.forEach((cookie) => {
const parts = cookie.split(';')[0].split('=');
const key = parts[0];
const value = parts[1];
if (key && value && key.length > 0 && value.length > 0) {
cookies[key] = value;
const parts = cookie.split(';')[0]?.split('=');
if (parts) {
const key = parts[0];
const value = parts[1];
if (key && value && key.length > 0 && value.length > 0) {
cookies[key] = value;
}
}
});
}