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

[2.1.0] TypeError: is(...).replace is not a function #2385

Closed
Starfox64 opened this issue Aug 17, 2023 · 5 comments · Fixed by #2386
Closed

[2.1.0] TypeError: is(...).replace is not a function #2385

Starfox64 opened this issue Aug 17, 2023 · 5 comments · Fixed by #2386

Comments

@Starfox64
Copy link

Describe the bug
After the release of 2.1.0, the Something went wrong... error is displayed.

TypeError: is(...).replace is not a function
    at https://cdn.jsdelivr.net/npm/redoc@latest/bundles/redoc.standalone.js:1202:826
    at https://cdn.jsdelivr.net/npm/redoc@latest/bundles/redoc.standalone.js:1092:9329
    at https://cdn.jsdelivr.net/npm/redoc@latest/bundles/redoc.standalone.js:1092:3516
    at Ke (https://cdn.jsdelivr.net/npm/redoc@latest/bundles/redoc.standalone.js:2:534482)
    at t.track (https://cdn.jsdelivr.net/npm/redoc@latest/bundles/redoc.standalone.js:2:538805)
    at Ch (https://cdn.jsdelivr.net/npm/redoc@latest/bundles/redoc.standalone.js:1092:3492)
    at l (https://cdn.jsdelivr.net/npm/redoc@latest/bundles/redoc.standalone.js:1092:9307)
    at oa (https://cdn.jsdelivr.net/npm/redoc@latest/bundles/redoc.standalone.js:2:362151)
    at Ba (https://cdn.jsdelivr.net/npm/redoc@latest/bundles/redoc.standalone.js:2:371669)
    at Fa (https://cdn.jsdelivr.net/npm/redoc@latest/bundles/redoc.standalone.js:2:371003)

Reverting to 2.0.0 solves this issue.

Expected behavior
No error.

Minimal reproducible OpenAPI snippet(if possible)
https://demo.franchiseoncloud.fr/v2/openapi

Screenshots
N/A

Additional context
N/A

@gmoorcroft
Copy link

Experiencing the same issue.
Sample yaml file that is failing on 2.1.0 and succeeding on 2.0.0 is available here - https://www.thalesdocs.com/dpod/extern/api/swagger-public.yaml

@yilunandrewgao
Copy link

This error seems to occur when there's a default: [] in the openapi file. Is this code trying to call replace on an empty list?

@RomanHotsiy
Copy link
Member

We're looking into it

@AlexVarchuk
Copy link
Collaborator

Released. Please verify in 2.1.1

@adamaltman
Copy link
Member

@AlexVarchuk please add tests to prevent regressions.

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

Successfully merging a pull request may close this issue.

6 participants