diff --git a/CHANGELOG.md b/CHANGELOG.md index da33633b..4cc7d587 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how ### Added - Support setting the default language to solve problems [(#5)](https://github.com/jdneo/vscode-leetcode/issues/5) +### Fixed +- When user cancels login, no further actions will happen [(#10)](https://github.com/jdneo/vscode-leetcode/issues/10) + ## [0.1.2] ### Fixed - Fix the deplicated nodes in LeetCode Explorer bug [(#6)](https://github.com/jdneo/vscode-leetcode/issues/6) diff --git a/src/leetCodeManager.ts b/src/leetCodeManager.ts index af73e882..95f0c426 100644 --- a/src/leetCodeManager.ts +++ b/src/leetCodeManager.ts @@ -59,7 +59,7 @@ class LeetCodeManager extends EventEmitter implements ILeetCodeManager { }); if (!name) { childProc.kill(); - resolve(undefined); + return resolve(undefined); } childProc.stdin.write(`${name}\n`); const pwd: string | undefined = await vscode.window.showInputBox({ @@ -69,7 +69,7 @@ class LeetCodeManager extends EventEmitter implements ILeetCodeManager { }); if (!pwd) { childProc.kill(); - resolve(undefined); + return resolve(undefined); } childProc.stdin.write(`${pwd}\n`); childProc.stdin.end();