mirror of
https://github.com/Wanxp/obsidian-douban.git
synced 2026-04-04 16:48:44 +08:00
fix login error
This commit is contained in:
parent
fa29664757
commit
1119b105ba
@ -186,6 +186,7 @@ export function constructLoginCookieSettingsUI(containerEl: HTMLElement, parentC
|
|||||||
const user:User = await manager.plugin.userComponent.loginCookie(manager.getCookieTemp())
|
const user:User = await manager.plugin.userComponent.loginCookie(manager.getCookieTemp())
|
||||||
if (!user || !user.id) {
|
if (!user || !user.id) {
|
||||||
log.notice(i18nHelper.getMessage('100137'))
|
log.notice(i18nHelper.getMessage('100137'))
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
constructDoubanTokenSettingsUI(parentContainerEl, manager);
|
constructDoubanTokenSettingsUI(parentContainerEl, manager);
|
||||||
});
|
});
|
||||||
|
|||||||
@ -116,6 +116,9 @@ export default class UserComponent {
|
|||||||
if (userUrl && userUrl.indexOf('people/') > 0) {
|
if (userUrl && userUrl.indexOf('people/') > 0) {
|
||||||
id = userUrl.substring(userUrl.lastIndexOf('people/') + 7, userUrl.lastIndexOf('/'));
|
id = userUrl.substring(userUrl.lastIndexOf('people/') + 7, userUrl.lastIndexOf('/'));
|
||||||
}
|
}
|
||||||
|
if (!id) {
|
||||||
|
return new User();
|
||||||
|
}
|
||||||
return {
|
return {
|
||||||
id: id,
|
id: id,
|
||||||
name: name,
|
name: name,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user