API not fetching data on deployment

on my local host, everything works well, but after I deploy on vercel, the web app fails to fetch data from the API as required. what could be the problem, please?

function init() {
  randomBtnWord();
  fetch("https://animechan.xyz/api/random")
    .then((response) => response.json())
    .then((quote) => {
      console.log(quote);
      quoteText.textContent = quote.quote;
      character.textContent = `~ ${quote.character} [ ${quote.anime} ]`;
    });
}
Was this page helpful?