Skip to content

Commit

Permalink
[Code] fallback with symbolInformation.name for typeahead (#40654) (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
mw-ding authored Jul 10, 2019
1 parent 64995d9 commit f8fb833
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ export const SuggestionComponent: SFC<Props> = props => {

// An util function to help highlight the substring which matches the query.
const renderMatchingText = (text: string) => {
if (!text) {
return text;
}
// Match the text with query in case sensitive mode first.
let index = text.indexOf(props.query);
if (index < 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export class SymbolSuggestionsProvider extends AbstractSuggestionsProvider {
description: this.getSymbolDescription(symbol.symbolInformation.location),
end: 10,
start: 1,
text: symbol.qname,
text: symbol.qname ? symbol.qname : symbol.symbolInformation.name,
tokenType: this.symbolKindToTokenClass(symbol.symbolInformation.kind),
selectUrl: this.getSymbolLinkUrl(symbol.symbolInformation.location),
};
Expand Down
1 change: 0 additions & 1 deletion x-pack/legacy/plugins/code/server/__tests__/multi_node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ const xpackOption = {
},
};

// Skip because of issue: https://github.com/elastic/code/issues/1387
describe('code in multiple nodes', () => {
const codeNodeUuid = 'c4add484-0cba-4e05-86fe-4baa112d9e53';
const nonodeNodeUuid = '22b75e04-0e50-4647-9643-6b1b1d88beaf';
Expand Down

0 comments on commit f8fb833

Please sign in to comment.