diff --git a/packages/lib/JoplinServerApi.ts b/packages/lib/JoplinServerApi.ts index 9f96751426a..6dbb81291a7 100644 --- a/packages/lib/JoplinServerApi.ts +++ b/packages/lib/JoplinServerApi.ts @@ -80,6 +80,10 @@ export default class JoplinServerApi { const clientInfo = await this.getClientInfo(); + if (!this.options_.username() || !this.options_.password()) { + return null; + } + try { this.session_ = await this.exec_('POST', 'api/sessions', null, { email: this.options_.username(),