From 1e6cc118682eb004056ebc51b78c8b08c72e2384 Mon Sep 17 00:00:00 2001 From: pedr Date: Wed, 3 Apr 2024 11:43:22 -0300 Subject: [PATCH] Desktop, Mobile, Cli: Avoid unnecessary requests if Joplin Cloud credentials are empty (#10256) --- packages/lib/JoplinServerApi.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/lib/JoplinServerApi.ts b/packages/lib/JoplinServerApi.ts index 9f9675142..6dbb81291 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(),