Skip to content

Commit 607351b

Browse files
author
Dennis Labordus
committed
Fixed review comment.
Signed-off-by: Dennis Labordus <[email protected]>
1 parent 9203a07 commit 607351b

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/compas-editors/CompasVersions.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -140,16 +140,12 @@ export default class CompasVersionsPlugin extends LitElement {
140140

141141
private getCurrentVersion(): string {
142142
const header = this.doc.querySelector('Header');
143-
return (header && header.hasAttribute('version')
144-
? header.getAttribute('version')!
145-
: 'unknown');
143+
return header!.getAttribute('version') ?? 'unknown';
146144
}
147145

148146
private getCurrentName(): string {
149147
const sclName = this.doc.querySelector('SCL > Private[type="compas_scl"] > SclName');
150-
return (sclName && sclName.textContent
151-
? sclName.textContent
152-
: 'unknown');
148+
return sclName!.textContent ?? 'unknown';
153149
}
154150

155151
render(): TemplateResult {

0 commit comments

Comments
 (0)