ngrx-store-localstorage
                                
                                
                                
                                    ngrx-store-localstorage copied to clipboard
                            
                            
                            
                        checkStorageAvailability = true overwrites specified storage
I'm trying to use this library to sync parts of my store to sessionStorage.
The project uses SSR so we need to check for availability of storage.
Unfortunately, it seems impossible to use the "storage" and "checkStorageAvailability" config options at the same time, because this code in localStorageSync function:
if (config.storage === undefined && !config.checkStorageAvailability || (config.checkStorageAvailability && checkIsBrowserEnv()) ) { config.storage = localStorage || window.localStorage; }
will override config.storage to use localstorage if(config.checkStorageAvailability && checkIsBrowserEnv()).
Does anyone have alternative ideas on how to run this metaReducer conditionally only if inside a browser environment, with sessionStorage instead of localStorage?
It doesn't work for me either, they check IsBrowserEnv via
typeof window !== 'undefined'
but i have mocked window via domino in server.ts, so this check makes no sense