Skip to content

Commit

Permalink
Emmet can return empty array for css #47429
Browse files Browse the repository at this point in the history
  • Loading branch information
ramya-rao-a committed Apr 10, 2018
1 parent 4057d3b commit 283e02f
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,9 @@ connection.onCompletion(async (textDocumentPosition, token) => {
let settings = await getDocumentSettings(document, () => doComplete.length > 2);
let result = doComplete(document, textDocumentPosition.position, settings, completionParticipants);
if (emmetCompletionList.isIncomplete) {
emmetCompletionList.items = emmetCompletionList.items || [];
cachedCompletionList = result;
if (hexColorRegex.test(emmetCompletionList.items[0].label) && result.items.some(x => x.label === emmetCompletionList.items[0].label)) {
if (emmetCompletionList.items.length && hexColorRegex.test(emmetCompletionList.items[0].label) && result.items.some(x => x.label === emmetCompletionList.items[0].label)) {
emmetCompletionList.items.shift();
}
return CompletionList.create([...emmetCompletionList.items, ...result.items], emmetCompletionList.isIncomplete || result.isIncomplete);
Expand Down

0 comments on commit 283e02f

Please sign in to comment.