Skip to content

Commit

Permalink
Only remove child if it actually exists
Browse files Browse the repository at this point in the history
  • Loading branch information
planger committed Apr 3, 2020
1 parent cf616bf commit afbd851
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/features/command-palette/command-palette.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,9 @@ export class CommandPalette extends AbstractUIExtension {
}

protected onLoaded(success: 'success' | 'error') {
this.containerElement.removeChild(this.loadingIndicator);
if (this.containerElement.contains(this.loadingIndicator)) {
this.containerElement.removeChild(this.loadingIndicator);
}
}

protected renderLabeledActionSuggestion(item: LabeledAction, value: string) {
Expand Down

0 comments on commit afbd851

Please sign in to comment.