Skip to content

Commit

Permalink
Remove a redundant error check.
Browse files Browse the repository at this point in the history
Followup to #87 (comment)
  • Loading branch information
lgarron committed Dec 2, 2022
1 parent 5dfb899 commit cbac95d
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,11 +195,7 @@ export default class IncludeFragmentElement extends HTMLElement {
}

async #getStringOrErrorData(): Promise<string> {
const data = await this.#getData()
if (data instanceof Error) {
throw data
}
return data.toString()
return (await this.#getData()).toString()
}

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

0 comments on commit cbac95d

Please sign in to comment.