We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 19aa9ee + 735efe2 commit 4d8e21bCopy full SHA for 4d8e21b
connect/service.js
@@ -105,14 +105,7 @@ const getTopic = (topicId) => request
105
throw new Error(`Failed to get topic details of topic id: ${topicId}`);
106
}
107
108
- const topic = _.get(res, 'body.result.content');
109
-
110
- // this API gives an array instead of one topic
111
- if (topic.length < 1) {
112
- throw new Error(`Failed to get topic details of topic id: ${topicId}`);
113
- }
114
115
- return topic[0];
+ return _.get(res, 'body.result.content');
116
}).catch((err) => {
117
const errorDetails = _.get(err, 'response.body.result.content.message');
118
throw new Error(
0 commit comments