Skip to content

Commit

Permalink
fix: addlib
Browse files Browse the repository at this point in the history
  • Loading branch information
Saber2pr committed Jul 27, 2022
1 parent 7a36a79 commit 3b4ff3b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/core/typescript.ts
Expand Up @@ -65,7 +65,10 @@ export const addModuleDeclaration = async (

let text = ''
try {
text = await fetch(url).then(res => res.text())
const res = await fetch(url)
if (res.ok) {
text = await res.text()
}
} catch (error) {}

if (text) {
Expand Down

0 comments on commit 3b4ff3b

Please sign in to comment.