From 69fff07c1f1a09d6dc61222d1e8c965f48786394 Mon Sep 17 00:00:00 2001 From: PalmDevs Date: Tue, 19 Aug 2025 21:37:11 +0700 Subject: [PATCH] fix(lib/storage): read `options.load` and act in `Storage` directly --- lib/storage/src/index.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/storage/src/index.ts b/lib/storage/src/index.ts index ebf7b42..1a1d91a 100644 --- a/lib/storage/src/index.ts +++ b/lib/storage/src/index.ts @@ -1,5 +1,3 @@ -// TODO(storage): Implement using NativeModules interop instead - import { FileModule } from '@revenge-mod/discord/native' import { getErrorStack } from '@revenge-mod/utils/error' import { mergeDeep } from '@revenge-mod/utils/object' @@ -73,6 +71,8 @@ export function Storage( ) } } + + if (options?.load) this.get() } // React is only initialized right before the init stage, so this is a dummy method @@ -94,8 +94,6 @@ export function getStorage( const storage: Storage = Object.create(Storage.prototype) Storage.call(storage, path, options) - if (options?.load) storage.get() - return storage }