From e9909d0a24bb5f0dc6210bd2af7f8d694bab926c Mon Sep 17 00:00:00 2001 From: Ou Date: Sat, 19 Oct 2024 15:42:09 +0800 Subject: [PATCH] fix: uploadMetadata --- src/hooks/useSync.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hooks/useSync.ts b/src/hooks/useSync.ts index 474426c..cf784a2 100644 --- a/src/hooks/useSync.ts +++ b/src/hooks/useSync.ts @@ -9,7 +9,7 @@ import { safeParseString } from "~/utils" export async function uploadMetadata(metadata: PrimitiveMetadata) { if (!__ENABLE_LOGIN__) return - const jwt = localStorage.getItem("jwt") + const jwt = safeParseString(localStorage.getItem("jwt")) if (!jwt) return try { await ofetch("/api/me/sync", {