Skip to content

Commit 90ef500

Browse files
committed
Simplified code
1 parent a21f6de commit 90ef500

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/app/waveform-view/waveform-view.component.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ import { createSegmentLabel } from './segment-label-factory';
1313
})
1414
export class WaveformViewComponent implements AfterViewInit {
1515

16-
@Input() selectedAudio: ExampleAudio = {} as ExampleAudio;
17-
@ViewChild("zoomviewContainer") zoomview: ElementRef = {} as ElementRef;
18-
@ViewChild("overviewContainer") overview: ElementRef = {} as ElementRef;
19-
@ViewChild("audio") audioElement: ElementRef = {} as ElementRef;
16+
@Input() selectedAudio!: ExampleAudio;
17+
@ViewChild("zoomviewContainer") zoomview!: ElementRef;
18+
@ViewChild("overviewContainer") overview!: ElementRef;
19+
@ViewChild("audio") audioElement!: ElementRef;
2020
peaks?: PeaksInstance;
2121

2222
constructor() {
@@ -78,7 +78,7 @@ export class WaveformViewComponent implements AfterViewInit {
7878
}
7979

8080
ngOnChanges(changes: SimpleChanges): void {
81-
if (!this.audioElement.nativeElement) {
81+
if (!this.audioElement) {
8282
return;
8383
}
8484

0 commit comments

Comments
 (0)