Skip to content

Commit

Permalink
fix: don't display the warning bar if there is an issue (#1420)
Browse files Browse the repository at this point in the history
but don't block the whole javascript page loading
  • Loading branch information
12rambau authored Aug 23, 2023
1 parent 78d60a3 commit fd3f8c5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/pydata_sphinx_theme/assets/scripts/pydata-sphinx-theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -425,9 +425,10 @@ function showVersionWarningBanner(data) {
var preferredEntries = data.filter((entry) => entry.preferred);
if (preferredEntries.length !== 1) {
const howMany = preferredEntries.length == 0 ? "No" : "Multiple";
throw new Error(
`[PST] ${howMany} versions marked "preferred" found in versions JSON`
console.log(
`[PST] ${howMany} versions marked "preferred" found in versions JSON, ignoring.`
);
return;
}
const preferredVersion = preferredEntries[0].version;
const preferredURL = preferredEntries[0].url;
Expand Down

0 comments on commit fd3f8c5

Please sign in to comment.