summaryrefslogtreecommitdiffstats
path: root/documentation
diff options
context:
space:
mode:
authorQuentin Schulz <quentin.schulz@theobroma-systems.com>2022-04-14 13:33:25 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-04-19 12:37:42 +0100
commit7b3a83f7369f9688109fd19394f0b6998dd6eae7 (patch)
tree0150c9214e60ed5883eba5bc00670ce851072de4 /documentation
parentc6421fce9dcffca68ad7c4abd4f760f7052ad849 (diff)
downloadpoky-7b3a83f7369f9688109fd19394f0b6998dd6eae7.tar.gz
docs: sphinx-static: switchers.js.in: remove duplicate for outdated versions
Since commit f2b069be8c307 "set_versions: Various improvements", an outdated version will always appear in all_versions, meaning there'll always be an exact match in the loop (just above the git context of this patch) so there's no need to add the current_version to the dropdown menu manually. This issue showed up only for outdated versions of obsolete releases, e.g. 3.2.3. In that case, 3.2.4 (latest version of the obsolete release) will appear in the all_versions array in addition to 3.2.3, which means the check on release series (3.2) will be matched twice, and 3.2.3 will be printed once in the 3.2.4 loop because version != current_version and once in the 3.2.3 because it is an exact match to an entry in all_versions. Cc: Quentin Schulz <foss+yocto@0leil.net> (From yocto-docs rev: 05065fa1f3855e8b7d9e8af0502b4ae402273400) Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation')
-rw-r--r--documentation/sphinx-static/switchers.js.in3
1 files changed, 0 insertions, 3 deletions
diff --git a/documentation/sphinx-static/switchers.js.in b/documentation/sphinx-static/switchers.js.in
index 5d3a4d7935..e7ef2ce5f5 100644
--- a/documentation/sphinx-static/switchers.js.in
+++ b/documentation/sphinx-static/switchers.js.in
@@ -72,9 +72,6 @@ by https://git.yoctoproject.org/yocto-autobuilder-helper/tree/scripts/run-docs-b
72 buf.push('<option value="' + version + '" selected="selected">' + title + '</option>'); 72 buf.push('<option value="' + version + '" selected="selected">' + title + '</option>');
73 else 73 else
74 buf.push('<option value="' + version + '">' + title + '</option>'); 74 buf.push('<option value="' + version + '">' + title + '</option>');
75
76 if (version != current_version)
77 buf.push('<option value="' + current_version + '" selected="selected">' + current_version + '</option>');
78 } else { 75 } else {
79 buf.push('<option value="' + version + '">' + title + '</option>'); 76 buf.push('<option value="' + version + '">' + title + '</option>');
80 } 77 }