mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 16:23:44 +00:00
JSON stringify memory items (#7731)
* JSON stringify memory items stringification is required so they can be reliably sent through messaging * Simplify null handling
This commit is contained in:
@@ -30,6 +30,8 @@ import {
|
||||
GlobalStateProvider,
|
||||
SingleUserStateProvider,
|
||||
} from "@bitwarden/common/platform/state";
|
||||
// eslint-disable-next-line import/no-restricted-paths -- Implementation for memory storage
|
||||
import { MemoryStorageService as MemoryStorageServiceForStateProviders } from "@bitwarden/common/platform/state/storage/memory-storage.service";
|
||||
|
||||
import { PolicyListService } from "../admin-console/core/policy-list.service";
|
||||
import { HtmlStorageService } from "../core/html-storage.service";
|
||||
@@ -87,7 +89,7 @@ import { WebPlatformUtilsService } from "./web-platform-utils.service";
|
||||
provide: MEMORY_STORAGE,
|
||||
useClass: MemoryStorageService,
|
||||
},
|
||||
{ provide: OBSERVABLE_MEMORY_STORAGE, useExisting: MEMORY_STORAGE },
|
||||
{ provide: OBSERVABLE_MEMORY_STORAGE, useClass: MemoryStorageServiceForStateProviders },
|
||||
{
|
||||
provide: OBSERVABLE_DISK_STORAGE,
|
||||
useFactory: () => new WindowStorageService(window.sessionStorage),
|
||||
|
||||
Reference in New Issue
Block a user