Fix issue with version 3 in docs version list (#74089)

Previously would subsitute the "3" in "s3" instead of the version location in the URL
pull/72601/merge
Scott Sinclair 4 years ago committed by GitHub
parent 9ba6cf9a72
commit 325ccf22fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -13,10 +13,10 @@
if ( "{{ slug }}" == "{{ current_version }}" ) { if ( "{{ slug }}" == "{{ current_version }}" ) {
option.selected = true; option.selected = true;
} }
if (current_url.search("{{ current_version }}") > -1) { if (current_url.search("/{{ current_version }}/") > -1) {
option.value = current_url.replace("{{ current_version }}","{{ slug }}"); option.value = current_url.replace("/{{ current_version }}/","/{{ slug }}/");
} else { } else {
option.value = current_url.replace("latest","{{ slug }}"); option.value = current_url.replace("/latest/","/{{ slug }}/");
} }
x.add(option); x.add(option);
</script> </script>

Loading…
Cancel
Save