We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f4a9971 commit c634f36Copy full SHA for c634f36
src/ApiDocs.res
@@ -172,10 +172,14 @@ module SidebarTree = {
172
ReactEvent.Form.preventDefault(evt)
173
let version = (evt->ReactEvent.Form.target)["value"]
174
let url = Url.parse(router.asPath)
175
- if version < "v12.0.0" {
176
- url.pagepath[1] = "core"
177
- } else {
178
- url.pagepath[1] = "stdlib"
+ switch url.pagepath[1] {
+ | Some("core") | Some("stdlib") =>
+ if version < "v12.0.0" {
+ url.pagepath[1] = "core"
179
+ } else {
180
+ url.pagepath[1] = "stdlib"
181
+ }
182
+ | _ => ()
183
}
184
185
let targetUrl =
0 commit comments