Fix completions broken by prettier

This commit is contained in:
glacambre 2019-04-02 18:59:47 +02:00
parent 673bf6f280
commit 2ccd6bd4a4
No known key found for this signature in database
GPG key ID: B9625DB1767553AC
2 changed files with 7 additions and 9 deletions

View file

@ -157,17 +157,13 @@ export abstract class CompletionSourceFuse extends CompletionSource {
protected lastExstr: string
protected optionContainer = html`
<table class="optionContainer"></table>
`
protected optionContainer = html`<table class="optionContainer"></table>`
constructor(prefixes, className: string, title?: string) {
super(prefixes)
this.node = html`
<div class="${className} hidden">
this.node = html`<div class="${className} hidden">
<div class="sectionHeader">${title || className}</div>
</div>
`
</div>`
this.node.appendChild(this.optionContainer)
this.state = "hidden"
}

View file

@ -42,8 +42,10 @@ export class MinimalKey {
readonly shiftKey = false
constructor(readonly key: string, modifiers?: KeyModifiers) {
for (let mod of Object.keys(modifiers)) {
this[mod] = modifiers[mod]
if (modifiers !== undefined) {
for (let mod of Object.keys(modifiers)) {
this[mod] = modifiers[mod]
}
}
}