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
|
if (payload) err.payload = payload
|
||||||
throw err
|
throw err
|
||||||
}
|
}
|
||||||
|
if (res.status === 204 || res.headers.get('content-length') === '0') return null
|
||||||
return res.json()
|
return res.json()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user