rajivkale commited on
Commit
a0180df
1 Parent(s): 4ca5f9c

Update static/script.js

Browse files
Files changed (1) hide show
  1. static/script.js +5 -1
static/script.js CHANGED
@@ -13,5 +13,9 @@ textGenForm.addEventListener("submit", async (event) => {
13
  const textGenInput = document.getElementById("text-gen-input");
14
  const textGenParagraph = document.querySelector(".text-gen-output");
15
 
16
- textGenParagraph.textContent = await translateText(textGenInput.value);
 
 
 
 
17
  });
 
13
  const textGenInput = document.getElementById("text-gen-input");
14
  const textGenParagraph = document.querySelector(".text-gen-output");
15
 
16
+ try {
17
+ textGenParagraph.textContent = await translateText(textGenInput.value);
18
+ } catch (err) {
19
+ console.error(err);
20
+ }
21
  });