refactor: Remove dedundant httpError assignment
This commit is contained in:
@@ -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) => {
|
||||
|
Reference in New Issue
Block a user