summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--github.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/github.js b/github.js
index a3b3223..84c8630 100644
--- a/github.js
+++ b/github.js
@@ -218,8 +218,14 @@ GitHubBackend.prototype.saveProject = function (ide, callBack, errorCall) {
GitHubBackend.prototype.getProjectList = function (callBack, errorCall) {
var myself = this;
- if (myself.gh !== null) {
- myself.gh.getUser().getRepos().then(
+ if (myself.gh !== null){
+ var user = myself.gh.getUser();
+
+ if (user === null) {
+ errorCall.call(myself, localize('Please login'), 'GitHub');
+ }
+
+ user.getRepos().then(
function (repos) {
var snapProjects = [];