1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-30 23:44:55 +02:00

Desktop: Fixes #3962: Certain commands no longer worked.

This commit is contained in:
Laurent Cozic
2020-10-21 17:22:29 +01:00
parent 0cede5f90a
commit 5e040c062c
2 changed files with 5 additions and 3 deletions

View File

@ -12,7 +12,9 @@ export const declaration:CommandDeclaration = {
// synchronisation depending on the "syncStarted" parameter
export const runtime = ():CommandRuntime => {
return {
execute: async (_context:CommandContext, syncStarted:boolean = false) => {
execute: async (context:CommandContext, syncStarted:boolean = null) => {
syncStarted = syncStarted === null ? context.state.syncStarted : syncStarted;
const action = syncStarted ? 'cancel' : 'start';
if (!(await reg.syncTarget().isAuthenticated())) {