login: Fix console crash when retrieving null value from local storage

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8795
GitOrigin-RevId: 95e39e46a3193fd0ac47a8e69b58e9172942d6e3
This commit is contained in:
Aaysha 2023-04-18 18:51:17 +05:30 committed by hasura-bot
parent 13b5f277ac
commit 30f32b676c

View File

@ -25,7 +25,7 @@ export const getFromLS = () => {
export const getKeyFromLS = key => {
const retrieveFromLS = getFromLS();
return retrieveFromLS[key] || '';
return retrieveFromLS?.[key] || '';
};
export const modifyKey = (key, value) => {