Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion typescript/packages/common-charm/src/storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,12 @@ class StorageImpl implements Storage {
let provider = this.storageProviders.get(space);

if (!provider) {
const type = (import.meta as any).env?.VITE_STORAGE_TYPE ?? "remote";
// Default to "remote", but let either custom URL (used in tests) or
// environment variable override this.
const type =
this.remoteStorageUrl?.protocol === "memory:"
? "memory"
: ((import.meta as any).env?.VITE_STORAGE_TYPE ?? "remote");

if (type === "remote") {
if (!this.remoteStorageUrl) throw new Error("No remote storage URL set");
Expand Down
Loading
Loading