fix: Service Worker 캐시 오류 및 auth-manager JSON.parse 오류 수정
- sw.js: POST 요청 캐시 시도 차단 (Cache API는 GET만 지원) - sw.js: staleWhileRevalidate에서 response.clone() 타이밍 수정 (body 소비 전에 clone하도록 변경) - sw.js: 캐시 버전 v1.0.3으로 업데이트하여 구버전 캐시 강제 갱신 - auth-manager.js: 쿠키/localStorage에 "undefined" 문자열 저장된 경우 JSON.parse 오류 방지 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -65,11 +65,14 @@ class AuthManager {
|
||||
*/
|
||||
_getUser() {
|
||||
const ssoUser = this._cookieGet('sso_user') || localStorage.getItem('sso_user');
|
||||
if (ssoUser) {
|
||||
if (ssoUser && ssoUser !== 'undefined' && ssoUser !== 'null') {
|
||||
try { return JSON.parse(ssoUser); } catch(e) {}
|
||||
}
|
||||
const userStr = localStorage.getItem('currentUser');
|
||||
return userStr ? JSON.parse(userStr) : null;
|
||||
if (userStr && userStr !== 'undefined' && userStr !== 'null') {
|
||||
try { return JSON.parse(userStr); } catch(e) {}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user