Skip to content

Commit

Permalink
Reformat code
Browse files Browse the repository at this point in the history
  • Loading branch information
morpheus-87 committed May 14, 2021
1 parent 29ea699 commit af4715d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions dc-cudami-admin/src/main/resources/static/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,11 @@ function addLanguageChangeHandler() {
// get the href attribute and cut off the leading hash to get the selected language
var selectedLanguage = $(this).attr('href').slice(1)
var editUrl = $('#edit-button').attr('href').split('?')
var urlParams = editUrl.length > 1 ? new URLSearchParams(editUrl[1]) : new URLSearchParams('')
urlParams.set('activeLanguage', selectedLanguage);
var urlParams =
editUrl.length > 1
? new URLSearchParams(editUrl[1])
: new URLSearchParams('')
urlParams.set('activeLanguage', selectedLanguage)
editUrl = [editUrl[0], urlParams.toString()]
$('#edit-button, #sticky-edit-button').attr('href', editUrl.join('?'))
})
Expand Down

0 comments on commit af4715d

Please sign in to comment.