Tools: Fixed tests when using Joplin Server as sync target

server_native_lock
Laurent Cozic 2021-10-31 18:31:40 +00:00
parent 99ea4b73b5
commit 401f1b1f83
1 changed files with 3 additions and 0 deletions

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
}