Fix log entry format

This commit is contained in:
Manav Rathi 2024-04-08 21:00:05 +05:30
parent f92a4c2a6e
commit 59bda25be2
No known key found for this signature in database

View file

@ -42,7 +42,7 @@ export const logToDisk = (message: string) => {
logs.slice(logs.length - maxCount);
}
logs.push(log);
localStorage.setItem(lsKey, JSON.stringify(logs));
localStorage.setItem(lsKey, JSON.stringify({ logs }));
} catch (e) {
console.error("Failed to persist log", e);
if (e instanceof Error && e.name === "QuotaExceededError") {