Skip to content

Commit

Permalink
Fixed home button not working occasionally when using versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
squidfunk committed Jul 3, 2022
1 parent adabdd0 commit a261130
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion material/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@
</script>
{% endblock %}
{% block scripts %}
<script src="{{ 'assets/javascripts/bundle.382fbf4b.min.js' | url }}"></script>
<script src="{{ 'assets/javascripts/bundle.6c7ad80a.min.js' | url }}"></script>
{% for path in config["extra_javascript"] %}
<script src="{{ path | url }}"></script>
{% endfor %}
Expand Down
2 changes: 1 addition & 1 deletion src/assets/javascripts/integrations/version/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ export function setupVersionSelector(
if (ev.target instanceof Element) {
const el = ev.target.closest("a")
if (el && !el.target && urls.has(el.href)) {
ev.preventDefault()
const url = el.href
// This is a temporary hack to detect if a version inside the
// version selector or on another part of the site was clicked.
Expand All @@ -122,6 +121,7 @@ export function setupVersionSelector(
if (version === current)
return EMPTY
}
ev.preventDefault()
return of(url)
}
}
Expand Down

0 comments on commit a261130

Please sign in to comment.