We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 040a175 commit 06be51dCopy full SHA for 06be51d
typescript/packages/common-charm/src/storage.ts
@@ -233,7 +233,12 @@ class StorageImpl implements Storage {
233
let provider = this.storageProviders.get(space);
234
235
if (!provider) {
236
- const type = (import.meta as any).env?.VITE_STORAGE_TYPE ?? "remote";
+ // Default to "remote", but let either custom URL (used in tests) or
237
+ // environment variable override this.
238
+ const type =
239
+ this.remoteStorageUrl?.protocol === "memory:"
240
+ ? "memory"
241
+ : ((import.meta as any).env?.VITE_STORAGE_TYPE ?? "remote");
242
243
if (type === "remote") {
244
if (!this.remoteStorageUrl) throw new Error("No remote storage URL set");
0 commit comments