1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-11-24 08:12:24 +02:00

Tools: Fixed tests when using Joplin Server as sync target

This commit is contained in:
Laurent Cozic 2021-10-31 18:31:40 +00:00
parent 99ea4b73b5
commit 401f1b1f83

View File

@ -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_;
@ -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
}