Skip to content

Commit 6d791df

Browse files
committed
Fix #88
1 parent b4ee7d7 commit 6d791df

File tree

1 file changed

+2
-1
lines changed
  • src/export_command/wikimedia_function

1 file changed

+2
-1
lines changed

src/export_command/wikimedia_function/bot.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,8 @@ export async function getDefaultBot(): Promise<MWBot | undefined> {
100100

101101
export async function getLoggedInBot(): Promise<MWBot | undefined> {
102102
const config: vscode.WorkspaceConfiguration = vscode.workspace.getConfiguration("wikitext");
103-
if (bot === undefined) {
103+
// if bot is not be created or not logged in
104+
if (bot === undefined || !bot.loggedIn) {
104105
switch (config.get('autoLogin')) {
105106
case 'Always':
106107
return await login() ? bot : undefined;

0 commit comments

Comments
 (0)