refactor: Remove dedundant httpError assignment

This commit is contained in:
Faruk AYDIN
2022-10-21 19:38:33 +02:00
parent 59b9c66a91
commit bcff9f5a9e
3 changed files with 4 additions and 23 deletions

View File

@@ -15,14 +15,8 @@ export default {
const response = await $.http.get('/conversations.list');
if (response.httpError) {
channels.error = response.httpError;
return channels;
}
if (response.data.ok === false) {
channels.error = response.data;
return channels;
throw new Error(response.data);
}
channels.data = response.data.channels.map((channel: IJSONObject) => {