Bläddra i källkod

fix: remove sync service constructor params

Gerald 8 år sedan
förälder
incheckning
7ece6f946c
1 ändrade filer med 4 tillägg och 5 borttagningar
  1. 4 5
      src/background/sync/base.js

+ 4 - 5
src/background/sync/base.js

@@ -111,9 +111,9 @@ export function getStates() {
 }
 
 function serviceFactory(base) {
-  const Service = function constructor(...args) {
-    if (!(this instanceof Service)) return new Service(...args);
-    this.initialize(...args);
+  const Service = function constructor() {
+    if (!(this instanceof Service)) return new Service();
+    this.initialize();
   };
   Service.prototype = base;
   Service.extend = extendService;
@@ -136,8 +136,7 @@ export const BaseService = serviceFactory({
   delayTime: 1000,
   urlPrefix: '',
   metaFile: 'Violentmonkey',
-  initialize(name) {
-    if (name) this.name = name;
+  initialize() {
     this.progress = {
       finished: 0,
       total: 0,