1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-29 22:48:10 +02:00

Minor CLI bug fixes and improvements

This commit is contained in:
Laurent Cozic
2017-07-26 22:07:27 +01:00
parent 76a9264239
commit 89f1d5e6e7
10 changed files with 113 additions and 38 deletions

View File

@@ -236,7 +236,10 @@ class OneDriveApi {
}
async refreshAccessToken() {
if (!this.auth_) throw new Error('Cannot refresh token: authentication data is missing');
if (!this.auth_ || !this.auth_.refresh_token) {
this.setAuth(null);
throw new Error('Cannot refresh token: authentication data is missing');
}
let body = new shim.FormData();
body.append('client_id', this.clientId());