From 80f4b931a41b4254d1715af7a2a31a1610257083 Mon Sep 17 00:00:00 2001 From: smallchill Date: Wed, 8 Jan 2020 13:16:21 +0800 Subject: [PATCH] =?UTF-8?q?:zap:=20=E5=A2=9E=E5=BC=BA=E6=9D=83=E9=99=90?= =?UTF-8?q?=E5=88=A4=E6=96=AD=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/authority.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/authority.js b/src/utils/authority.js index fee394c..8743a69 100644 --- a/src/utils/authority.js +++ b/src/utils/authority.js @@ -17,7 +17,7 @@ export function getAuthority(str) { } export function setAuthority(authority) { - const proAuthority = typeof authority === 'string' ? authority.split(',') : authority; + const proAuthority = typeof authority === 'string' ? authority.split(',') : (typeof authority === 'undefined' ? null : authority); return localStorage.setItem('sword-authority', JSON.stringify(proAuthority)); }