Fix the levels viewer: markers were drawn on whichever plan was showing
This commit is contained in:
@@ -213,9 +213,18 @@ async function search(q) {
|
||||
}
|
||||
|
||||
function performSearch() {
|
||||
if (searchInput.value.trim()) {
|
||||
router.push({ path: '/search', query: { q: searchInput.value.trim() } })
|
||||
const term = searchInput.value.trim()
|
||||
if (!term) return
|
||||
// Searching a term that is ALREADY in the URL is a duplicate navigation: the
|
||||
// router aborts it, so the route watcher never fires and the button does
|
||||
// nothing at all. Re-run the query directly in that case. The sidebar box
|
||||
// never hits this, because it is always navigating from somewhere else -
|
||||
// which is why the two search boxes appeared to behave differently.
|
||||
if (term === route.query.q) {
|
||||
search(term)
|
||||
return
|
||||
}
|
||||
router.push({ path: '/search', query: { q: term } })
|
||||
}
|
||||
|
||||
async function openKBArticle(result) {
|
||||
|
||||
Reference in New Issue
Block a user