Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 157a1c2

Browse files
committed
Remove a reundant error check.
Followup to #87 (comment)
1 parent e3f41e6 commit 157a1c2

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 | Error> {
198-
const data = await this.#getData()
199-
if (data instanceof Error) {
200-
return 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)