Skip to content

Commit

Permalink
Update app.js
Browse files Browse the repository at this point in the history
  • Loading branch information
sorukumar authored Apr 26, 2024
1 parent 5f5b5f1 commit a7a4456
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion rank/profile/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,15 @@ document.addEventListener('DOMContentLoaded', function() {

// Set the alias in the search input
const searchBox = document.getElementById('searchBox');
if (alias) {
if (searchBox && alias) {
searchBox.value = decodeURIComponent(alias);

// Manually trigger the input event
const event = new Event('input', {
bubbles: true,
cancelable: true,
});
searchBox.dispatchEvent(event);
}

const suggestions = document.getElementById('suggestions');
Expand Down

0 comments on commit a7a4456

Please sign in to comment.