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

Created on 14 Apr 2021  ·  5Comments  ·  Source: lostisland/faraday

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('');
}

bug help wanted

All 5 comments

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

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

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

_Now_ it worked perfectly, on my laptop. Hmmm.

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

Was this page helpful?
0 / 5 - 0 ratings