Skip to content

Commit

Permalink
fix: 修复报错
Browse files Browse the repository at this point in the history
  • Loading branch information
wangxingkang committed Nov 7, 2020
1 parent 05c833e commit 72b0135
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/utils/cookie.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import { TOKEN_KEY } from '@/config';
const cookieKey = TOKEN_KEY;

export function getCookie() {
return localStorage.get(cookieKey);
return localStorage.getItem(cookieKey);
}

export function setCookie(value: string | object) {
return localStorage.set(cookieKey, value);
export function setCookie(value: string) {
return localStorage.setItem(cookieKey, value);
}

export function removeCookie() {
return localStorage.remove(cookieKey);
return localStorage.removeItem(cookieKey);
}

1 comment on commit 72b0135

@vercel
Copy link

@vercel vercel bot commented on 72b0135 Nov 7, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.