pydata-sphinx-theme icon indicating copy to clipboard operation
pydata-sphinx-theme copied to clipboard

Error: e.map is not a function

Open dstansby opened this issue 4 months ago • 2 comments

I'm trying to get an up to date version of pydata-sphinx-theme working with Matplotlib (https://github.com/matplotlib/matplotlib/pull/27658). With the current main branch of pydata-sphinx-theme search/theme changing/version switching isn't working, and I think this is because of the javascript error we're getting,

Uncaught (in promise) TypeError: e.map is not a function
    g https://output.circle-artifacts.com/output/job/65bed756-88de-4a26-93f0-3d06e9d8950f/artifacts/0/doc/build/html/_static/scripts/pydata-sphinx-theme.js?digest=2f715a4ca1682955a1c0:1
    937 https://output.circle-artifacts.com/output/job/65bed756-88de-4a26-93f0-3d06e9d8950f/artifacts/0/doc/build/html/_static/scripts/pydata-sphinx-theme.js?digest=2f715a4ca1682955a1c0:1
[pydata-sphinx-theme.js:1:4657](https://output.circle-artifacts.com/output/job/65bed756-88de-4a26-93f0-3d06e9d8950f/artifacts/0/doc/build/html/_static/scripts/pydata-sphinx-theme.js?digest=2f715a4ca1682955a1c0)

The code that is triggering this is

const n=(e=e.map((e=>(e.match=e.version==DOCUMENTATION_OPTIONS.theme_switcher_version_match,e.preferred=e.preferred||!1,"name"in e||(e.name=e.version),e)))).map((e=>e.preferred&&e.match)).some(Boolean)

It looks like this is some minified(???) javascript, so I'm not sure how to proceed with debugging. Any pointers welcome (is there a way to turn off the squashing of all the javascript into one line?)

A doc build that has this error is here: https://output.circle-artifacts.com/output/job/65bed756-88de-4a26-93f0-3d06e9d8950f/artifacts/0/doc/build/html/index.html

dstansby avatar Feb 17 '24 10:02 dstansby