Commit 52e5250b authored by Dennis Tang's avatar Dennis Tang Committed by Clement Ho

Resolve "Top nav search bar produces console error when unauthenticated"

parent bed7ff8e
......@@ -137,7 +137,11 @@ export default class SearchAutocomplete {
if (!term) {
const contents = this.getCategoryContents();
if (contents) {
this.searchInput.data('glDropdown').filter.options.callback(contents);
const glDropdownInstance = this.searchInput.data('glDropdown');
if (glDropdownInstance) {
glDropdownInstance.filter.options.callback(contents);
}
this.enableAutocomplete();
}
return;
......
---
title: fix error caused when using the search bar while unauthenticated
merge_request: 20970
author:
type: fixed
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment