From 516f44f54be6671e661a540230ad1b309ae924ad Mon Sep 17 00:00:00 2001 From: Burkhard Reffeling Date: Mon, 22 Aug 2016 21:21:12 +0100 Subject: [PATCH] fix build --- app/main/tasks/updateLastActiveProject.js | 4 +++- app/shared/reducers/project.js | 13 +++++++++++-- package.json | 13 +++++++------ 3 files changed, 21 insertions(+), 9 deletions(-) diff --git a/app/main/tasks/updateLastActiveProject.js b/app/main/tasks/updateLastActiveProject.js index 09c8d03..a975270 100644 --- a/app/main/tasks/updateLastActiveProject.js +++ b/app/main/tasks/updateLastActiveProject.js @@ -10,7 +10,9 @@ export default function updateLastActiveProject(store) { }, } = store.getState(); - store.dispatch(getGithubIssuesAssignedToUser(accessToken)); + if (accessToken) { + store.dispatch(getGithubIssuesAssignedToUser(accessToken)); + } } // every 5 minutes diff --git a/app/shared/reducers/project.js b/app/shared/reducers/project.js index 1903a3b..47bc8dd 100644 --- a/app/shared/reducers/project.js +++ b/app/shared/reducers/project.js @@ -78,12 +78,13 @@ export default function job(state = initialState, action) { }; } + const issues = action.payload || []; let newState = { ...state, importError: false, }; // go through each body, finding "Tracks #..." - action.payload.forEach(issue => { + issues.forEach(issue => { const identifiers = [ // for issues ...getProjectIdentifiers(issue.body), @@ -99,10 +100,18 @@ export default function job(state = initialState, action) { } case GET_GITHUB_ISSUES_ASSIGNED_TO_USER: { + if (action.error) { + return { + ...state, + importError: true, + }; + } + + const issues = action.payload || []; let newState = { ...state }; // extract projects, add updatedAt to project - action.payload.forEach(issue => { + issues.forEach(issue => { const identifiers = [ // for issues ...getProjectIdentifiers(issue.body), diff --git a/package.json b/package.json index f20028a..7a12195 100644 --- a/package.json +++ b/package.json @@ -57,13 +57,10 @@ "babel-register": "^6.7.2", "chai": "^3.5.0", "chromedriver": "^2.23.0", - "co-mocha": "^1.1.2", "concurrently": "^2.0.0", "cross-env": "^2.0.0", "css-loader": "^0.23.1", "del": "^2.2.2", - "electron-builder": "^5.26.0", - "electron-prebuilt": "^1.0.2", "electron-rebuild": "^1.1.3", "eslint": "^3.3.0", "eslint-config-airbnb": "^10.0.1", @@ -88,6 +85,10 @@ "webpack-dev-middleware": "^1.6.1", "webpack-hot-middleware": "^2.10.0" }, + "devDependencies": { + "electron-builder": "^5.26.0", + "electron-prebuilt": "^1.0.2" + }, "devEngines": { "node": "4.x || 5.x || 6.x", "npm": "2.x || 3.x" @@ -96,12 +97,12 @@ "Jack Wilkinson (https://github.com/guacjack)" ], "build": { - "app-bundle-id": "hardchor.timesheets", - "app-category-type": "public.app-category.productivity", + "appId": "hardchor.timesheets", + "category": "public.app-category.productivity", "productName": "Timesheets", "compression": "normal", "asar": true, - "osx": { + "mac": { "contents": [ { "x": 448,