Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Website: Team page fails to fetch data, a JS error #1266

Closed
olleolleolle opened this issue Apr 14, 2021 · 5 comments
Closed

Website: Team page fails to fetch data, a JS error #1266

olleolleolle opened this issue Apr 14, 2021 · 5 comments

Comments

@olleolleolle
Copy link
Member

olleolleolle commented Apr 14, 2021

Basic Info

This is about the website.
Page: https://lostisland.github.io/faraday/team/

Issue description

A spinner remains. The console show a JS error about the team.js file.

Perhaps the information structure on the fetched data page has changed?

Steps to reproduce

I was using Firefox.

Navigate to Page: https://lostisland.github.io/faraday/team/

Open Console;

Uncaught (in promise) TypeError: json.findIndex is not a function
    innerHTML https://lostisland.github.io/faraday/assets/js/team.js:16
    fetchTeam https://lostisland.github.io/faraday/assets/js/team.js:15
    <anonymous> https://lostisland.github.io/faraday/assets/js/team.js:43

The code for that function was

function fetchTeam(json, team, div) {
  let el = document.querySelector(div);
  el.innerHTML = team.map(function (m) {
    let index = json.findIndex(function(e) {
      return e.author.login === m
    });
    return teamTile(json.splice(index, 1)[0]);
  }).join('');
}

@olleolleolle olleolleolle changed the title Website: Team page fails to fetch data Website: Team page fails to fetch data, a JS error Apr 14, 2021
@iMacTia
Copy link
Member

iMacTia commented Apr 14, 2021

I just tried this out and it's working fine for me, maybe it was just a temporary issue?

@olleolleolle
Copy link
Member Author

I tried it out on my phone and got the spinner only. Hm!

@iMacTia
Copy link
Member

iMacTia commented Apr 15, 2021

Strange, according to MDN this function should be supported by Firefox as well 🤔

@olleolleolle
Copy link
Member Author

Now it worked perfectly, on my laptop. Hmmm.

@olleolleolle
Copy link
Member Author

...and on my phone. Hm. CLOSING!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants