dlbnco / tripby.org

Harm reduction info about psychoactive drugs with data provided by PsychonautWiki.org
https://tripby.org
23 stars 3 forks source link

Replace Array.flatMap() with lodash's flatMap #70

Closed dlbnco closed 5 years ago

dlbnco commented 5 years ago

Array.flatMap() is not supported on the server, so we're getting 500 errors:

2019-09-22T08:46:55.025Z    d8223dd7-bcf0-4c0a-a9ba-84257d97e845    Error while running `getDataFromTree` TypeError: list.flatMap is not a function
    at getClasses (/var/task/page.js:36243:70)
    at Home (/var/task/page.js:36288:29)
    at c (/var/task/page.js:16757:501)
    at Sa (/var/task/page.js:16760:1)
    at a.module.exports.FDah.a.render (/var/task/page.js:16765:467)
    at a.module.exports.FDah.a.read (/var/task/page.js:16765:58)
    at renderToStaticMarkup (/var/task/page.js:16777:181)
    at process (/var/task/page.js:45619:20)
    at <anonymous>
    at process._tickDomainCallback (internal/process/next_tick.js:228:7)

image

This PR replaces it with lodash's flatMap()

vercel[bot] commented 5 years ago

This pull request is automatically deployed with Now. To access deployments, click Details below or on the icon next to each push.

Latest deployment for this branch: https://tripbyorg-git-fix-server-500.dlbnco.now.sh