Fix default date range setting.

This commit is contained in:
Mike Cao 2022-03-01 22:02:31 -08:00
parent 69b81880cb
commit 7a3c1e9faa
4 changed files with 12 additions and 13 deletions

View file

@ -56,7 +56,7 @@ export const doNotTrack = () => {
};
export const setItem = (key, data, session) => {
if (typeof window !== 'undefined') {
if (typeof window !== 'undefined' && data) {
(session ? sessionStorage : localStorage).setItem(key, JSON.stringify(data));
}
};