Skip to content

Commit 823f3fc

Browse files
committed
simplify
1 parent 0fdd082 commit 823f3fc

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

src/lib/util/utils.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -153,16 +153,11 @@ export async function makeRequest(options: Options) {
153153
throw new Error(`StatusCode: "${response.status}", ResponseBody: "${responseBody}."`)
154154
}
155155

156-
let res = responseBody
157156
try {
158-
if (typeof responseBody.valueOf() === "string") {
159-
res = parseContent(options.url, responseBody)
160-
}
157+
return parseContent(options.url, responseBody)
161158
} catch (error) {
162159
throw new Error(`An error occurred while parsing the file ${options.url}. The error is:\n ${util.inspect(error, { depth: null })}.`)
163160
}
164-
165-
return res
166161
}
167162

168163
/*

0 commit comments

Comments
 (0)