Skip to content

Commit cbac95d

Browse files
committed
Remove a redundant error check.
Followup to #87 (comment)
1 parent 5dfb899 commit cbac95d

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/index.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -195,11 +195,7 @@ export default class IncludeFragmentElement extends HTMLElement {
195195
}
196196

197197
async #getStringOrErrorData(): Promise<string> {
198-
const data = await this.#getData()
199-
if (data instanceof Error) {
200-
throw data
201-
}
202-
return data.toString()
198+
return (await this.#getData()).toString()
203199
}
204200

205201
// Functional stand in for the W3 spec "queue a task" paradigm

0 commit comments

Comments
 (0)