diff --git a/src/renderer/utils/storageHelper.ts b/src/renderer/utils/storageHelper.ts index 2502b75403..5222d16ec1 100755 --- a/src/renderer/utils/storageHelper.ts +++ b/src/renderer/utils/storageHelper.ts @@ -89,23 +89,14 @@ export class StorageHelper { @action private configure({ storage, observable }: StorageConfiguration = this.options): this { - if (storage) this.configureStorage(storage); + if (storage) this.storage = storage; if (observable) this.configureObservable(observable); return this; } @action - protected configureStorage(storage: StorageAdapter) { - this.storage = Object.getOwnPropertyNames(storage).reduce((storage, name: keyof StorageAdapter) => { - storage[name] = storage[name]?.bind(this); // bind storage-adapter methods to "this"-context - - return storage; - }, { ...storage }); - } - - @action - protected configureObservable(options: CreateObservableOptions = {}) { + private configureObservable(options: CreateObservableOptions = {}) { this.data = observable.box(this.data.get(), { ...StorageHelper.defaultOptions.observable, // inherit default observability options ...options,