Browse Source

fix: check sync when service is changed

Gerald 5 years ago
parent
commit
63f7364f98
2 changed files with 2 additions and 3 deletions
  1. 2 2
      src/background/sync/base.js
  2. 0 1
      src/background/sync/index.js

+ 2 - 2
src/background/sync/base.js

@@ -3,7 +3,7 @@ import {
 } from '#/common';
 import { TIMEOUT_HOUR } from '#/common/consts';
 import {
-  forEachEntry, objectGet, objectSet, objectPick, objectPurify,
+  forEachEntry, objectSet, objectPick, objectPurify,
 } from '#/common/object';
 import {
   getEventEmitter, getOption, setOption, hookOptions,
@@ -579,6 +579,6 @@ export function setConfig(config) {
 }
 
 hookOptions((data) => {
-  const value = objectGet(data, 'sync.current');
+  const value = data?.['sync.current'];
   if (value) initialize();
 });

+ 0 - 1
src/background/sync/index.js

@@ -30,5 +30,4 @@ export {
   getStates,
   authorize,
   revoke,
-  setConfig,
 };