Skip to content

Commit 21abbfe

Browse files
committed
Simplified code
1 parent 784a64e commit 21abbfe

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

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

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@ export class WaveformViewComponent implements AfterViewInit {
4949

5050
this.audioElement.nativeElement.src = this.selectedAudio.audioUrl;
5151

52-
this.destroyPeaks();
53-
5452
Peaks.init(options, (err, peaks) => {
5553
if (err) {
5654
console.error(err);
@@ -63,10 +61,6 @@ export class WaveformViewComponent implements AfterViewInit {
6361
}
6462

6563
ngOnDestroy(): void {
66-
this.destroyPeaks();
67-
}
68-
69-
destroyPeaks(): void {
7064
if (this.peaks) {
7165
this.peaks.destroy();
7266
this.peaks = undefined;
@@ -104,7 +98,6 @@ export class WaveformViewComponent implements AfterViewInit {
10498
}
10599
});
106100
}
107-
this.initPeaks();
108101
}
109102
}
110103
}

0 commit comments

Comments
 (0)