fix(phase-4): request() skip res.json() for 204 No Content — fixes delete not updating UI
This commit is contained in:
1 parent
a7c6c9612b
commit
31f8c00970
1 file changed
+1
@@ -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