mirror of
https://github.com/vector-im/element-call.git
synced 2024-11-21 00:28:08 +08:00
Use the repsonse,.ok rather than manual status code check
This commit is contained in:
parent
f64bd0ab25
commit
edcf9f3fd5
@ -47,7 +47,7 @@ export async function getSFUConfigWithOpenID(
|
||||
device_id: client.getDeviceId(),
|
||||
}),
|
||||
});
|
||||
if (res.status / 100 !== 2) {
|
||||
if (!res.ok) {
|
||||
throw new Error("SFO Config fetch failed with status code " + res.status);
|
||||
}
|
||||
const sfuConfig = await res.json();
|
||||
|
Loading…
Reference in New Issue
Block a user