Skip to content

Commit

Permalink
Use of externally-controlled format string
Browse files Browse the repository at this point in the history
  • Loading branch information
ngvtuan committed Dec 7, 2023
1 parent afdf504 commit 40913a0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/helpers/localStorage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const readCacheValue = (key: string, isMicroseconds = false) => {
}
return initialValue;
} catch (error) {
console.warn(`Error reading localStorage key “${key}”:`, error);
console.warn(`Error reading localStorage key “${key}”: ${(error as Error)?.message}`);
return initialValue;
}
};
Expand Down Expand Up @@ -81,7 +81,7 @@ export const setCacheValue = (key: string, value: string) => {
window.localStorage.setItem(CLUSTER_URL_LOCAL_STORAGE, clusterUrl);
return true;
} catch (error) {
console.warn(`Error setting localStorage key “${key}”:`, error);
console.warn(`Error setting localStorage key “${key}”: ${(error as Error)?.message}`);
return false;
}
};
Expand Down

0 comments on commit 40913a0

Please sign in to comment.