Fix typo in dashboard sort element (#8875)

This commit is contained in:
rhymes 2020-06-24 14:03:27 +02:00 committed by GitHub
parent c2af5d8f59
commit 9cdd03f0dc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 7 deletions

View file

@ -1,11 +1,11 @@
'use strict';
function initializeDashboardSort() {
if (document.getElementById('dashhboard_sort')) {
document
.getElementById('dashhboard_sort')
.addEventListener('change', event => {
window.location = '/dashboard?sort=' + event.target.value;
});
const dashboardSorter = document.getElementById('dashboard_sort');
if (dashboardSorter) {
dashboardSorter.addEventListener('change', (event) => {
window.location.assign(`/dashboard?sort=${event.target.value}`);
});
}
}

View file

@ -42,7 +42,7 @@
<a class="video-upload-cta cta" href="/listings/dashboard" data-no-instant>
Create/Manage Listings
</a>
<%= select_tag "dashhboard_sort", options_for_select(sort_options, params[:sort]), 'aria-label': "Sort By" %>
<%= select_tag "dashboard_sort", options_for_select(sort_options, params[:sort]), 'aria-label': "Sort By" %>
<% if @articles.any? {|article| article.archived } %>
<%= link_to "Show archived", "javascript:;", id: "toggleArchivedLink" %>
<% end %>