mirror of
https://github.com/Microsoft/vscode
synced 2024-09-13 21:55:38 +00:00
Check the list length before splicing (#57617)
This commit is contained in:
parent
966bc2b003
commit
071c6b2077
|
@ -583,6 +583,10 @@ export class SuggestWidget implements IContentWidget, IVirtualDelegate<ICompleti
|
|||
this.currentSuggestionDetails = createCancelablePromise(token => item.resolve(token));
|
||||
|
||||
this.currentSuggestionDetails.then(() => {
|
||||
if (this.list.length < index) {
|
||||
return;
|
||||
}
|
||||
|
||||
// item can have extra information, so re-render
|
||||
this.ignoreFocusEvents = true;
|
||||
this.list.splice(index, 1, [item]);
|
||||
|
|
Loading…
Reference in a new issue