fix(phase-4): request() skip res.json() for 204 No Content — fixes delete not updating UI
This commit is contained in:
@@ -52,6 +52,7 @@ async function request(path, options = {}) {
|
||||
if (payload) err.payload = payload
|
||||
throw err
|
||||
}
|
||||
if (res.status === 204 || res.headers.get('content-length') === '0') return null
|
||||
return res.json()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user