ianluo commited on
Commit
c85df8a
·
1 Parent(s): a1be15a
Files changed (1) hide show
  1. static/script.js +5 -1
static/script.js CHANGED
@@ -13,5 +13,9 @@ textGenForm.addEventListener("submit", async (e) => {
13
  const textGenInput = document.getElementById("text-gen-input");
14
  const textGenParagraph = document.getElementById("text-gen-output");
15
 
16
- textGenParagraph.textContent = await translateText(textGenInput.value);
 
 
 
 
17
  });
 
13
  const textGenInput = document.getElementById("text-gen-input");
14
  const textGenParagraph = document.getElementById("text-gen-output");
15
 
16
+ try {
17
+ textGenParagraph.textContent = await translateText(textGenInput.value);
18
+ } catch (err) {
19
+ console.log(err);
20
+ }
21
  });