Skip to content

Commit

Permalink
Tools: Fixed tests when using Joplin Server as sync target
Browse files Browse the repository at this point in the history
  • Loading branch information
laurent22 committed Oct 31, 2021
1 parent 99ea4b7 commit 401f1b1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/lib/services/share/ShareService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export default class ShareService {
private static instance_: ShareService;
private api_: JoplinServerApi = null;
private store_: Store<any> = null;
private initialized_ = false;

public static instance(): ShareService {
if (this.instance_) return this.instance_;
Expand All @@ -21,11 +22,13 @@ export default class ShareService {
}

public initialize(store: Store<any>, api: JoplinServerApi = null) {
this.initialized_ = true;
this.store_ = store;
this.api_ = api;
}

public get enabled(): boolean {
if (!this.initialized_) return false;
return [9, 10].includes(Setting.value('sync.target')); // Joplin Server, Joplin Cloud targets
}

Expand Down

0 comments on commit 401f1b1

Please sign in to comment.