Code Monkey home page Code Monkey logo

Comments (4)

divergentdave avatar divergentdave commented on August 26, 2024 1

I'm getting this error too. projectList.map shows up in a render function for some component. The first couple times, render gets called with projectList set to the empty list, and the third time, it gets called with storeState.projectList.data set to a Response object, not a list. Looking at the same thing in Chrome, storeState.projectList.data is set to a list of five objects.

from open-redistricting.

divergentdave avatar divergentdave commented on August 26, 2024

I traced the difference down to https://github.com/stamen/usopendata/blob/9be05b920690f6c23f518bc578f7a043a470ba95/js/models/transport.js#L49. In both debuggers, returnVal appears to be a Promise, however Chrome takes the returnVal instanceof Promise branch and Firefox takes the else branch. As a result, the Promise for a Response in Firefox is treated as if it were already parsed and cached, so the JSON parser never gets run on it. This leads to the other issues down the line, eventually resulting in calling an array method on a Response.

Not sure what the root cause of this is, but my first guess would be dueling Promise classes from the browser and from libraries.

from open-redistricting.

waldoj avatar waldoj commented on August 26, 2024

Wow, I'm glad you chased that down, because I was not gonna figure that out. This is a great basis for me to start identifying the root case. Thank you!

from open-redistricting.

waldoj avatar waldoj commented on August 26, 2024

@EricSoko kindly fixed this with dfd4dbc.

from open-redistricting.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.